Struct typedef::TypeDef [] [src]

pub struct TypeDef { /* fields omitted */ }

Methods

impl TypeDef
[src]

[src]

Create a TypeDef structure from a type parameter.

use typedef::{ TypeDef };

let _typedef = TypeDef::of::<i64>();

[src]

Get TypeId for specified type directly.

use std::any::{ TypeId };
use typedef::{ TypeDef };

assert!(TypeDef::id_of::<i64>() == TypeId::of::<i64>());

[src]

Get type name for specified type directly.

This only works if this crate is compiled with features = ["nightly"]

Be careful when using this code, it's not being tested!
use typedef::{ TypeDef };

assert_eq!(TypeDef::name_of::<i64>(), "i64");

[src]

Check if typedef instance matches type.

use typedef::{ TypeDef };

let typedef = TypeDef::of::<i64>();

assert!(typedef.is::<i64>());

[src]

Get the static &str for typedef instance.

This only works if this crate is compiled with features = ["nightly"]

Be careful when using this code, it's not being tested!
use typedef::{ TypeDef };

let typedef = TypeDef::of::<i64>();

assert!(typedef.get_str() == "i64");

Trait Implementations

impl Clone for TypeDef
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for TypeDef
[src]

impl Eq for TypeDef
[src]

impl Ord for TypeDef
[src]

[src]

This method returns an Ordering between self and other. Read more

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl Debug for TypeDef
[src]

[src]

Formats the value using the given formatter.

impl PartialOrd for TypeDef
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Hash for TypeDef
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for TypeDef
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Display for TypeDef
[src]

[src]

Formats the value using the given formatter. Read more