pub struct ReadOnlyDevice<T> { /* private fields */ }Expand description
Wraps any T: BlockRead and makes it read-only at the type level.
Implementations§
Source§impl<T> ReadOnlyDevice<T>
impl<T> ReadOnlyDevice<T>
Trait Implementations§
Source§impl<T: BlockRead> BlockDevice for ReadOnlyDevice<T>
BlockDevice impl uses the trait’s default (Err(ReadOnly) for
write_at, no-op flush, is_writable() -> false). Even if T
implements BlockDevice with full writes, the wrapper hides that.
impl<T: BlockRead> BlockDevice for ReadOnlyDevice<T>
BlockDevice impl uses the trait’s default (Err(ReadOnly) for
write_at, no-op flush, is_writable() -> false). Even if T
implements BlockDevice with full writes, the wrapper hides that.
Auto Trait Implementations§
impl<T> Freeze for ReadOnlyDevice<T>where
T: Freeze,
impl<T> RefUnwindSafe for ReadOnlyDevice<T>where
T: RefUnwindSafe,
impl<T> Send for ReadOnlyDevice<T>where
T: Send,
impl<T> Sync for ReadOnlyDevice<T>where
T: Sync,
impl<T> Unpin for ReadOnlyDevice<T>where
T: Unpin,
impl<T> UnsafeUnpin for ReadOnlyDevice<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ReadOnlyDevice<T>where
T: UnwindSafe,
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