pub struct Protection {
pub read: bool,
pub write: bool,
pub execute: bool,
}Expand description
Memory protection bits a backend may set on a guest range.
Fields§
§read: boolGuest may read.
write: boolGuest may write.
execute: boolGuest may execute.
Implementations§
Source§impl Protection
impl Protection
Sourcepub const READ_WRITE: Self
pub const READ_WRITE: Self
Read-write.
Sourcepub const READ_EXECUTE: Self
pub const READ_EXECUTE: Self
Read-execute (e.g. kernel text).
Sourcepub const READ_WRITE_EXECUTE: Self
pub const READ_WRITE_EXECUTE: Self
Read-write-execute.
Trait Implementations§
Source§impl Clone for Protection
impl Clone for Protection
Source§fn clone(&self) -> Protection
fn clone(&self) -> Protection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Protection
impl Debug for Protection
Source§impl<'de> Deserialize<'de> for Protection
impl<'de> Deserialize<'de> for Protection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Protection
impl PartialEq for Protection
Source§fn eq(&self, other: &Protection) -> bool
fn eq(&self, other: &Protection) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Protection
impl Serialize for Protection
impl Copy for Protection
impl Eq for Protection
impl StructuralPartialEq for Protection
Auto Trait Implementations§
impl Freeze for Protection
impl RefUnwindSafe for Protection
impl Send for Protection
impl Sync for Protection
impl Unpin for Protection
impl UnsafeUnpin for Protection
impl UnwindSafe for Protection
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