[][src]Struct warmy::load::Loaded

pub struct Loaded<T, K> {
    pub res: T,
    pub deps: Vec<K>,
}

Result of a resource loading.

This type enables you to register a resource for reloading events of other resources. Those are named dependencies. If you don’t need to run specific code on a dependency reloading, use the .into() function to lift your return value to Loaded or use the provided Loaded::without_dep function.

Fields

res: T

The loaded object.

deps: Vec<K>

The list of dependencies to listen for events.

Methods

impl<T, K> Loaded<T, K>[src]

pub fn without_dep(res: T) -> Self[src]

Return a resource declaring no dependency at all.

pub fn with_deps(res: T, deps: Vec<K>) -> Self[src]

Return a resource along with its dependencies.

Trait Implementations

impl<T, K> From<T> for Loaded<T, K>[src]

Auto Trait Implementations

impl<T, K> Send for Loaded<T, K> where
    K: Send,
    T: Send

impl<T, K> Unpin for Loaded<T, K> where
    K: Unpin,
    T: Unpin

impl<T, K> Sync for Loaded<T, K> where
    K: Sync,
    T: Sync

impl<T, K> UnwindSafe for Loaded<T, K> where
    K: UnwindSafe,
    T: UnwindSafe

impl<T, K> RefUnwindSafe for Loaded<T, K> where
    K: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

impl<'a, T, C, M> Inspect<'a, C, (), M> for T[src]

impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T[src]

impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T[src]

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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