Skip to main content

ProtectReadWrite

Trait ProtectReadWrite 

Source
pub trait ProtectReadWrite<A: Zeroize + Bytes, PM: ProtectMode, LM: LockMode> {
    // Required method
    fn mprotect_readwrite(self) -> Result<Protected<A, ReadWrite, LM>, Error>;
}
Available on crate feature protected only.
Expand description

Protected region of memory that can be set as read-write.

Required Methods§

Source

fn mprotect_readwrite(self) -> Result<Protected<A, ReadWrite, LM>, Error>

Protects a region of memory as read-write (and no exec), using mprotect() on UNIX, or VirtualProtect() on Windows.

§Errors

Returns error::Error::Io if the page permissions cannot be changed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<A: Zeroize + Bytes, PM: ProtectMode, LM: LockMode> ProtectReadWrite<A, PM, LM> for Protected<A, PM, LM>