]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/book/src/ch05-00-structs.md
New upstream version 1.63.0+dfsg1
[rustc.git] / src / doc / book / src / ch05-00-structs.md
index abf9b3040dcf61761cb82106650237c81b841b1c..ff540b77db7f7d6a830e2f940d09e63234335e0c 100644 (file)
@@ -5,9 +5,10 @@ together and name multiple related values that make up a meaningful group. If
 you’re familiar with an object-oriented language, a *struct* is like an
 object’s data attributes. In this chapter, we’ll compare and contrast tuples
 with structs to build on what you already know and demonstrate when structs are
-a better way to group data. We’ll demonstrate how to define and instantiate
-structs. We’ll discuss how to define associated functions, especially the kind
-of associated functions called *methods*, to specify behavior associated with a
-struct type. Structs and enums (discussed in Chapter 6) are the building blocks
-for creating new types in your program’s domain to take full advantage of
-Rust’s compile time type checking.
+a better way to group data.
+
+We’ll demonstrate how to define and instantiate structs. We’ll discuss how to
+define associated functions, especially the kind of associated functions called
+*methods*, to specify behavior associated with a struct type. Structs and enums
+(discussed in Chapter 6) are the building blocks for creating new types in your
+program’s domain to take full advantage of Rust’s compile time type checking.