[][src]Enum tao_of_rust::ch02::enums::MyOption

pub enum MyOption {
    Some(i32),
    None,
}

枚举类型:Option

Basic usage:

enum Option{
    Some(i32),
    None,
}
let s = Some(42);
assert_eq!(s.unwrap(), 42);
match s {
    Some(n) => println!("num is: {}", n),
    None => (),
};Run

Variants

Auto Trait Implementations

impl Send for MyOption

impl Sync for MyOption

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.