pub struct Asset { /* private fields */ }Implementations
sourceimpl Asset
impl Asset
pub fn new(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 where
T: Any + Send + Sync,
pub fn get<T>(&self) -> Option<&T> where
T: Any + Send + Sync,
pub fn get_mut<T>(&mut self) -> Option<&mut T> where
T: Any + Send + Sync,
pub fn set<T>(&mut self, data: T) -> Box<dyn Any + Send + Sync> where
T: Any + Send + Sync,
Auto Trait Implementations
impl !RefUnwindSafe for Asset
impl Send for Asset
impl Sync for Asset
impl Unpin for Asset
impl !UnwindSafe for Asset
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more