pub struct ReadOnly;Expand description
Marker type used to signify that a hardened buffer is read-only.
The sodium_mprotect
API can be used to set a region of memory to be read-only, or totally inaccessible, to minimise
the risk of sensitive data being leaked. In order to provide a type-safe system for interacting
with this API, we attach a zero-sized MprotectStatus marker type to hardened buffers,
signifying the current memory-protection status of the buffer.
This type indicates a buffer may only be read from, and not written to. Attempts to write to a buffer in this state will result in the process being terminated.
Trait Implementations§
impl MprotectReadable for ReadOnly
impl MprotectStatus for ReadOnly
Auto Trait Implementations§
impl Freeze for ReadOnly
impl RefUnwindSafe for ReadOnly
impl Send for ReadOnly
impl Sync for ReadOnly
impl Unpin for ReadOnly
impl UnwindSafe for ReadOnly
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