Skip to main content

IconProvider

Trait IconProvider 

Source
pub trait IconProvider:
    AsAny
    + Debug
    + Send
    + Sync { }

Implementations§

Source§

impl dyn IconProvider + '_

Source

pub fn cast_ref<T>(&self) -> Option<&T>
where T: IconProvider,

Downcast to the backend concrete type.

Returns None if the object was not from that backend.

Source

pub fn cast_mut<T>(&mut self) -> Option<&mut T>
where T: IconProvider,

Mutable downcast to the backend concrete type.

Returns None if the object was not from that backend.

Source

pub fn cast<T>( self: Box<dyn IconProvider + '_>, ) -> Result<Box<T>, Box<dyn IconProvider + '_>>
where T: IconProvider,

Owned downcast to the backend concrete type.

Returns Err with self if the object was not from that backend.

Implementors§