pub struct Asset { /* private fields */ }Implementations§
Source§impl Asset
impl Asset
pub fn new<T>(protocol: &str, path: &str, data: T) -> Self
pub fn new_boxed( protocol: &str, path: &str, data: Box<dyn Any + Send + Sync>, ) -> Self
pub fn id(&self) -> AssetId
pub fn protocol(&self) -> &str
pub fn path(&self) -> &str
pub fn to_full_path(&self) -> String
pub fn is<T>(&self) -> bool
pub fn get<T>(&self) -> Option<&T>
pub fn get_mut<T>(&mut self) -> Option<&mut T>
pub fn set<T>(&mut self, data: T) -> Box<dyn Any + Send + Sync>
Auto Trait Implementations§
impl Freeze for Asset
impl !RefUnwindSafe for Asset
impl Send for Asset
impl Sync for Asset
impl Unpin for Asset
impl UnsafeUnpin for Asset
impl !UnwindSafe for Asset
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