Struct oxygengine::prelude::Asset
source · pub struct Asset { /* private fields */ }
Implementations§
source§impl Asset
impl Asset
pub fn new<T>(protocol: &str, path: &str, data: T) -> Assetwhere T: Any + Send + Sync + 'static,
pub fn new_boxed( protocol: &str, path: &str, data: Box<dyn Any + Send + Sync, Global> ) -> Asset
pub fn id(&self) -> ID<Asset>
pub fn protocol(&self) -> &str
pub fn path(&self) -> &str
pub fn to_full_path(&self) -> String
pub fn is<T>(&self) -> boolwhere 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, Global>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§
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