Enum pax_runtime_api::pax_value::PaxAny
source · pub enum PaxAny {
Builtin(PaxValue),
Any(Box<dyn Any>),
}
Expand description
This type serves a similar purpose as Box
Variants§
Implementations§
source§impl PaxAny
impl PaxAny
sourcepub fn try_coerce<T: ToFromPaxAny + CoercionRules + 'static>(
self
) -> Result<T, String>
pub fn try_coerce<T: ToFromPaxAny + CoercionRules + 'static>( self ) -> Result<T, String>
Try to co coerce the inner type to type T. For the any type, just make sure the stored any value is of type T. For a PaxValue, try to coerce it into the expected type
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PaxAny
impl !RefUnwindSafe for PaxAny
impl !Send for PaxAny
impl !Sync for PaxAny
impl Unpin for PaxAny
impl !UnwindSafe for PaxAny
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, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.