mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-05-25 11:28:10 +08:00
13 lines
225 B
Rust
13 lines
225 B
Rust
|
fn main() {
|
||
|
// ANCHOR: here
|
||
|
enum IpAddr {
|
||
|
V4(u8, u8, u8, u8),
|
||
|
V6(String),
|
||
|
}
|
||
|
|
||
|
let home = IpAddr::V4(127, 0, 0, 1);
|
||
|
|
||
|
let loopback = IpAddr::V6(String::from("::1"));
|
||
|
// ANCHOR_END: here
|
||
|
}
|