Trait type_info::DynamicTypeInfo [] [src]

pub trait DynamicTypeInfo {
    fn type_ref(&self) -> &'static Type;

    fn variant(&self) -> Option<&str> { ... }
fn field_any(&self, _id: FieldId) -> Option<&Any> { ... }
fn field_any_mut(&mut self, _id: FieldId) -> Option<&mut Any> { ... } }

A type that has compile-time dynamic type information associated with it.

This trait is built to be compatible with being a trait object.

Required Methods

The dynamic statically known type information for this type.

Provided Methods

Get the id of the currently active variant of this type, or None if the type is not an enum.

Get a dynamic reference to the value of a field on this type with the given field id.

This method will return the current value of the given field if possible, or None if the given field does not exist or does not have a type matching the supplied type.

Get a mutable dynamic reference to the value of a field on this type with the given field id.

This method will return the current value of the given field if possible, or None if the given field does not exist or does not have a type matching the supplied type.

Implementations on Foreign Types

impl DynamicTypeInfo for u8
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for u16
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for u32
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for u64
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for usize
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for i8
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for i16
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for i32
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for i64
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for isize
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for f32
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for f64
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for bool
[src]

[src]

[src]

[src]

[src]

impl DynamicTypeInfo for char
[src]

[src]

[src]

[src]

[src]

Implementors