Struct assets_manager::AssetReadGuard
source · pub struct AssetReadGuard<'a, T: ?Sized> { /* private fields */ }
Expand description
RAII guard used to keep a read lock on an asset and release it when dropped.
This type is a smart pointer to type T
.
It can be obtained by calling Handle::read
.
Implementations§
source§impl<'a, T: ?Sized> AssetReadGuard<'a, T>
impl<'a, T: ?Sized> AssetReadGuard<'a, T>
sourcepub fn map<U: ?Sized, F>(this: Self, f: F) -> AssetReadGuard<'a, U>
pub fn map<U: ?Sized, F>(this: Self, f: F) -> AssetReadGuard<'a, U>
Make a new AssetReadGuard
for a component of the locked data.
source§impl<'a> AssetReadGuard<'a, dyn Any>
impl<'a> AssetReadGuard<'a, dyn Any>
sourcepub fn downcast<T: Any>(self) -> Result<AssetReadGuard<'a, T>, Self>
pub fn downcast<T: Any>(self) -> Result<AssetReadGuard<'a, T>, Self>
Attempt to downcast the guard to a concrete type.
source§impl<'a> AssetReadGuard<'a, dyn Any + Send>
impl<'a> AssetReadGuard<'a, dyn Any + Send>
sourcepub fn downcast<T: Any>(self) -> Result<AssetReadGuard<'a, T>, Self>
pub fn downcast<T: Any>(self) -> Result<AssetReadGuard<'a, T>, Self>
Attempt to downcast the guard to a concrete type.
Trait Implementations§
source§impl<T, U> AsRef<U> for AssetReadGuard<'_, T>
impl<T, U> AsRef<U> for AssetReadGuard<'_, T>
source§impl<T> Debug for AssetReadGuard<'_, T>
impl<T> Debug for AssetReadGuard<'_, T>
source§impl<T: ?Sized> Deref for AssetReadGuard<'_, T>
impl<T: ?Sized> Deref for AssetReadGuard<'_, T>
Auto Trait Implementations§
impl<'a, T> Freeze for AssetReadGuard<'a, T>where
T: ?Sized,
impl<'a, T> !RefUnwindSafe for AssetReadGuard<'a, T>
impl<'a, T> !Send for AssetReadGuard<'a, T>
impl<'a, T> Sync for AssetReadGuard<'a, T>
impl<'a, T> Unpin for AssetReadGuard<'a, T>where
T: ?Sized,
impl<'a, T> !UnwindSafe for AssetReadGuard<'a, T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more