#[repr(transparent)]pub struct Opaque<T: ?Sized>(pub T);Expand description
Wrapper for struct fields whose types we don’t want to expose. Prevents direct access while preserving layout.
Tuple Fields§
§0: TTrait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Opaque<T>
impl<T> RefUnwindSafe for Opaque<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Opaque<T>
impl<T> Sync for Opaque<T>
impl<T> Unpin for Opaque<T>
impl<T> UnwindSafe for Opaque<T>where
T: UnwindSafe + ?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