pub struct Cage<Type: ?Sized> { /* private fields */ }Implementations§
Source§impl<Type: ?Sized> Cage<Type>
impl<Type: ?Sized> Cage<Type>
pub fn read<Returns>(&self, closure: impl FnOnce(&Type) -> Returns) -> Returns
pub fn write<Returns>( &self, closure: impl FnOnce(&mut Type) -> Returns, ) -> Returns
pub const fn new(value: Type) -> Cage<Type>where
Type: Sized,
pub fn release(self) -> Typewhere
Type: Sized,
pub fn replace(&self, value: Type) -> Typewhere
Type: Sized,
pub fn cloned(&self) -> Typewhere
Type: Clone,
pub fn get(&self) -> Typewhere
Type: Copy,
Trait Implementations§
Auto Trait Implementations§
impl<Type> !Freeze for Cage<Type>
impl<Type> RefUnwindSafe for Cage<Type>where
Type: ?Sized,
impl<Type> Send for Cage<Type>
impl<Type> Sync for Cage<Type>
impl<Type> Unpin for Cage<Type>
impl<Type> UnsafeUnpin for Cage<Type>where
Type: UnsafeUnpin + ?Sized,
impl<Type> UnwindSafe for Cage<Type>where
Type: ?Sized,
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