[][src]Struct oxygengine_core::assets::asset::Asset

pub struct Asset { /* fields omitted */ }

Implementations

impl Asset[src]

pub fn new(protocol: &str, path: &str, data: Box<dyn Any + Send + Sync>) -> Self[src]

pub fn id(&self) -> AssetID[src]

pub fn protocol(&self) -> &str[src]

pub fn path(&self) -> &str[src]

pub fn to_full_path(&self) -> String[src]

pub fn is<T>(&self) -> bool where
    T: Any + Send + Sync
[src]

pub fn get<T>(&self) -> Option<&T> where
    T: Any + Send + Sync
[src]

pub fn get_mut<T>(&mut self) -> Option<&mut T> where
    T: Any + Send + Sync
[src]

pub fn set<T>(&mut self, data: T) -> Box<dyn Any + Send + Sync> where
    T: Any + Send + Sync
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Any, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,