Trait core::any::Any
[−]
[src]
pub trait Any: Reflect + 'static { fn get_type_id(&self) -> TypeId; }
A type to emulate dynamic typing.
Every type with no non-'static
`'staticreferences implements
` references implements Any
`Any`.
See the module-level documentation for more details.
Required Methods
fn get_type_id(&self) -> TypeId
: this method will likely be replaced by an associated static
Gets the TypeId
`TypeIdof
` of self
`self`.
Methods
impl Any
fn is<T: Any>(&self) -> bool
Returns true if the boxed type is the same as T
`T`
fn downcast_ref<T: Any>(&self) -> Option<&T>
Returns some reference to the boxed value if it is of type T
`T, or
`, or
None
`None` if it isn't.
fn downcast_mut<T: Any>(&mut self) -> Option<&mut T>
Returns some mutable reference to the boxed value if it is of type T
`T, or
`, or
None
`None` if it isn't.
impl Any + Send
fn is<T: Any>(&self) -> bool
Forwards to the method defined on the type Any
`Any`.
fn downcast_ref<T: Any>(&self) -> Option<&T>
Forwards to the method defined on the type Any
`Any`.
fn downcast_mut<T: Any>(&mut self) -> Option<&mut T>
Forwards to the method defined on the type Any
`Any`.