pub struct AssetRegistry { /* private fields */ }Implementations§
Source§impl AssetRegistry
impl AssetRegistry
pub fn new() -> AssetRegistry
pub fn with_builtin_icons() -> AssetRegistry
pub fn register_font(&self, name: impl Into<String>, data: Vec<u8>)
pub fn set_default_font(&self, name: impl Into<String>)
pub fn default_font(&self) -> Option<String>
pub fn fonts(&self) -> Vec<(String, Rc<[u8]>)>
pub fn register_icon( &self, name: impl Into<String>, svg_src: &str, ) -> Result<(), SvgError>
pub fn register_icon_data(&self, name: impl Into<String>, icon: SvgIcon)
pub fn icon(&self, name: &str) -> Option<Rc<SvgIcon>>
pub fn icon_names(&self) -> Vec<String>
pub fn icons_in_namespace(&self, ns: &str) -> Vec<String>
pub fn rasterize_icon( &self, name: &str, px: u32, ) -> Result<Rc<Sprite>, AssetError>
pub fn photo_size(&self, path: &str) -> Result<(u32, u32), AssetError>
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 Default for AssetRegistry
impl Default for AssetRegistry
Source§fn default() -> AssetRegistry
fn default() -> AssetRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AssetRegistry
impl !Send for AssetRegistry
impl !Sync for AssetRegistry
impl !UnwindSafe for AssetRegistry
impl Freeze for AssetRegistry
impl Unpin for AssetRegistry
impl UnsafeUnpin 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