[][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> Sync for Loaded<T, K> where
    K: Sync,
    T: Sync

Blanket Implementations

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

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

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

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.