mirror of
https://github.com/rust-lang/book.git
synced 2026-11-30 21:51:17 -06:00
@@ -169,7 +169,7 @@ Listing 6-1: Storing the data and type of an IP address using a `struct`
|
|||||||
|
|
||||||
<!-- I will add wingdings here in libreoffice /Carol -->
|
<!-- I will add wingdings here in libreoffice /Carol -->
|
||||||
|
|
||||||
Here, we've defined a struct `IPAddr` that has two fields: a `kind` field that
|
Here, we've defined a struct `IpAddr` that has two fields: a `kind` field that
|
||||||
is of type `IpAddrKind` (the enum we defined previously), and an `address`
|
is of type `IpAddrKind` (the enum we defined previously), and an `address`
|
||||||
field of type `String`. We have two instances of this struct. The first,
|
field of type `String`. We have two instances of this struct. The first,
|
||||||
`home`, has the value `IpAddrKind::V4` as its `kind`, with associated address
|
`home`, has the value `IpAddrKind::V4` as its `kind`, with associated address
|
||||||
|
|||||||
Reference in New Issue
Block a user