GuardedMut

Trait GuardedMut 

Source
pub unsafe trait GuardedMut: Guarded {
    // Required method
    fn borrow_guarded_mut(&mut self) -> &mut Self::Target;
}
Expand description

A trait for pointer types that uphold the guard invariants, and are able to dereference mutably.

Required Methods§

Source

fn borrow_guarded_mut(&mut self) -> &mut Self::Target

Borrow the pointee mutably, into a fixed reference that can be sent directly and safely to e.g. memory-sharing completion-based I/O interfaces.

Implementors of such interfaces must however take buffers by reference to maintain safety.

Implementors§

Source§

impl<T, U> GuardedMut for AssertSafe<T>
where T: Deref<Target = U> + DerefMut, U: ?Sized,

Source§

impl<T, U> GuardedMut for MappedMut<T, U>
where T: GuardedMut, U: ?Sized,

Source§

impl<T, U> GuardedMut for T
where T: DerefMut<Target = U> + StableDeref + 'static, U: ?Sized,