In this lesson, we will talk about "Enums" in Rust
Enums in Rust are a way to define a type by enumerating its possible values. Here's an example:
enum IpAddrKind {
V4,
V6,
}
let four = IpAddrKind::V4;
let six = IpAddrKind::V6;
Join now
In this lesson, we will talk about "Enums" in Rust
Enums in Rust are a way to define a type by enumerating its possible values. Here's an example:
enum IpAddrKind {
V4,
V6,
}
let four = IpAddrKind::V4;
let six = IpAddrKind::V6;
Join now
No posts