pub enum CastTarget {
Class(&'static TypeInfo),
Value(ValueType),
}Expand description
What a TypeCastNode casts to.
Variants§
Implementations§
Source§impl CastTarget
impl CastTarget
Sourcepub fn is_instance(&self, value: &BoxedValue) -> bool
pub fn is_instance(&self, value: &BoxedValue) -> bool
Whether value is an instance of the type (the is test of the
managed original): an object of the class or of a class deriving
from it; a value of exactly the value type, or one that is
assignable to it without conversion (a contract its type implements,
a base type it has a registered cast to).
Trait Implementations§
Source§impl Clone for CastTarget
impl Clone for CastTarget
impl Copy for CastTarget
Auto Trait Implementations§
impl Freeze for CastTarget
impl RefUnwindSafe for CastTarget
impl Send for CastTarget
impl Sync for CastTarget
impl Unpin for CastTarget
impl UnsafeUnpin for CastTarget
impl UnwindSafe for CastTarget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more