Trait AnyArg

Source
pub trait AnyArg: Downcast + Debug {
    // Required method
    fn boxed_clone(&self) -> Box<dyn AnyArg>;
}

Required Methods§

Source

fn boxed_clone(&self) -> Box<dyn AnyArg>

Implementations§

Source§

impl dyn AnyArg

Source

pub fn is<__T: AnyArg>(&self) -> bool

Returns true if the trait object wraps an object of type __T.

Source

pub fn downcast<__T: AnyArg>(self: Box<Self>) -> Result<Box<__T>, Box<Self>>

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn’t.

Source

pub fn downcast_rc<__T: AnyArg>(self: Rc<Self>) -> Result<Rc<__T>, Rc<Self>>

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn’t.

Source

pub fn downcast_ref<__T: AnyArg>(&self) -> Option<&__T>

Returns a reference to the object within the trait object if it is of type __T, or None if it isn’t.

Source

pub fn downcast_mut<__T: AnyArg>(&mut self) -> Option<&mut __T>

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn’t.

Trait Implementations§

Source§

impl Clone for Box<dyn AnyArg>

Source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§

Source§

impl<T> AnyArg for T
where T: 'static + Clone + Debug,