pub struct AssetRegistry { /* private fields */ }Implementations§
Source§impl AssetRegistry
impl AssetRegistry
pub fn new() -> Self
pub fn with_common_icons() -> Self
pub fn register_common_icons(&mut self)
pub fn register_icon( &mut self, descriptor: IconDescriptor, ) -> Option<IconDescriptor>
pub fn register_image( &mut self, descriptor: ImageDescriptor, ) -> Option<ImageDescriptor>
pub fn resolve_icon(&self, handle: &IconHandle) -> Option<&IconDescriptor>
pub fn resolve_built_in_icon( &self, icon: BuiltInIcon, ) -> Option<&IconDescriptor>
pub fn resolve_image(&self, handle: &ImageHandle) -> Option<&ImageDescriptor>
pub fn icon_asset(&self, handle: &IconHandle) -> Option<IconAsset>
pub fn built_in_icon_asset(&self, icon: BuiltInIcon) -> Option<IconAsset>
pub fn icon_count(&self) -> usize
pub fn image_count(&self) -> usize
pub fn search_icons(&self, query: &str) -> Vec<&IconDescriptor>
Trait Implementations§
Source§impl Clone for AssetRegistry
impl Clone for AssetRegistry
Source§fn clone(&self) -> AssetRegistry
fn clone(&self) -> AssetRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AssetRegistry
impl Debug for AssetRegistry
Source§impl Default for AssetRegistry
impl Default for AssetRegistry
Source§fn default() -> AssetRegistry
fn default() -> AssetRegistry
Returns the “default value” for a type. Read more
Source§impl PartialEq for AssetRegistry
impl PartialEq for AssetRegistry
Source§fn eq(&self, other: &AssetRegistry) -> bool
fn eq(&self, other: &AssetRegistry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AssetRegistry
Auto Trait Implementations§
impl Freeze for AssetRegistry
impl RefUnwindSafe for AssetRegistry
impl Send for AssetRegistry
impl Sync for AssetRegistry
impl Unpin for AssetRegistry
impl UnsafeUnpin for AssetRegistry
impl UnwindSafe for AssetRegistry
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.