[−][src]Struct warmy::load::Loaded
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
Auto Trait Implementations
impl<T, K> Unpin for Loaded<T, K> where
K: Unpin,
T: Unpin,
K: Unpin,
T: Unpin,
impl<T, K> Sync for Loaded<T, K> where
K: Sync,
T: Sync,
K: Sync,
T: Sync,
impl<T, K> Send for Loaded<T, K> where
K: Send,
T: Send,
K: Send,
T: Send,
impl<T, K> UnwindSafe for Loaded<T, K> where
K: UnwindSafe,
T: UnwindSafe,
K: UnwindSafe,
T: UnwindSafe,
impl<T, K> RefUnwindSafe for Loaded<T, K> where
K: RefUnwindSafe,
T: RefUnwindSafe,
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,