[][src]Struct tao_of_rust::ch02::structs::Integer

pub struct Integer(_);

元组结构体:NewType模式

Basic usage:

struct Integer(u32);
type Int = i32;  // 为i32类型创建别名Int
let int = Integer(10);
assert_eq!(int.0, 10);
let int: Int = 10;
assert_eq!(int, 10);Run

Auto Trait Implementations

impl Send for Integer

impl Sync for Integer

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.