Trait type_info::TypeInfo
[−]
[src]
pub trait TypeInfo: DynamicTypeInfo { const TYPE: Type; fn field<A>(&self, _id: FieldId) -> Option<&A>
where
A: Any, { ... } fn field_mut<A>(&mut self, _id: FieldId) -> Option<&mut A>
where
A: Any, { ... } }
A type that has compile-time static type information associated with it.
Associated Constants
Provided Methods
fn field<A>(&self, _id: FieldId) -> Option<&A> where
A: Any,
A: Any,
Get a 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.
fn field_mut<A>(&mut self, _id: FieldId) -> Option<&mut A> where
A: Any,
A: Any,
Get a mutable 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.