Struct goods::AssetResult
source · [−]pub struct AssetResult<A> { /* private fields */ }
Implementations
sourceimpl<A> AssetResult<A> where
A: Asset,
impl<A> AssetResult<A> where
A: Asset,
sourcepub fn build_optional<B>(
&mut self,
builder: &mut B
) -> Result<Option<&A>, Error> where
A: AssetBuild<B>,
pub fn build_optional<B>(
&mut self,
builder: &mut B
) -> Result<Option<&A>, Error> where
A: AssetBuild<B>,
Builds and returns asset.
Returns Err
if asset decoding or build errors.
Returns Ok(None)
if asset is not found.
sourcepub fn build<B>(&mut self, builder: &mut B) -> Result<&A, Error> where
A: AssetBuild<B>,
pub fn build<B>(&mut self, builder: &mut B) -> Result<&A, Error> where
A: AssetBuild<B>,
Builds and returns asset.
Returns Err
if asset decoding or build errors or if asset is not found.
Auto Trait Implementations
impl<A> !RefUnwindSafe for AssetResult<A>
impl<A> Send for AssetResult<A> where
A: Send,
impl<A> Sync for AssetResult<A> where
A: Sync,
impl<A> Unpin for AssetResult<A> where
A: Unpin,
impl<A> !UnwindSafe for AssetResult<A>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more