pub struct MachMemFlags { /* private fields */ }Expand description
Backend memory-operation flags.
These are the bit-packed flags that backends operate on directly.
Unlike ir::MemFlagsData, this does not carry alias-region metadata.
Implementations§
Source§impl MachMemFlags
impl MachMemFlags
Sourcepub const fn trusted() -> Self
pub const fn trusted() -> Self
Create a set of flags representing an access from a “trusted” address.
Sourcepub const fn endianness(self, native_endianness: Endianness) -> Endianness
pub const fn endianness(self, native_endianness: Endianness) -> Endianness
Return endianness of the memory access.
Sourcepub const fn explicit_endianness(self) -> Option<Endianness>
pub const fn explicit_endianness(self) -> Option<Endianness>
Return endianness of the memory access, if explicitly specified.
Sourcepub const fn with_endianness(self, endianness: Endianness) -> Self
pub const fn with_endianness(self, endianness: Endianness) -> Self
Set endianness of the memory access, returning new flags.
Sourcepub const fn with_notrap(self) -> Self
pub const fn with_notrap(self) -> Self
Set these flags to indicate this access does not trap.
Sourcepub const fn with_can_move(self) -> Self
pub const fn with_can_move(self) -> Self
Set the can_move flag, returning new flags.
Sourcepub const fn with_aligned(self) -> Self
pub const fn with_aligned(self) -> Self
Set the aligned flag, returning new flags.
Sourcepub const fn with_readonly(self) -> Self
pub const fn with_readonly(self) -> Self
Set the readonly flag, returning new flags.
Sourcepub const fn trap_code(self) -> Option<TrapCode>
pub const fn trap_code(self) -> Option<TrapCode>
Get the trap code to report if this memory access traps.
Sourcepub const fn with_trap_code(self, code: Option<TrapCode>) -> Self
pub const fn with_trap_code(self, code: Option<TrapCode>) -> Self
Configures these flags with the specified trap code code.
Trait Implementations§
Source§impl Clone for MachMemFlags
impl Clone for MachMemFlags
Source§fn clone(&self) -> MachMemFlags
fn clone(&self) -> MachMemFlags
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 moreimpl Copy for MachMemFlags
Source§impl Debug for MachMemFlags
impl Debug for MachMemFlags
Source§impl<'de> Deserialize<'de> for MachMemFlags
impl<'de> Deserialize<'de> for MachMemFlags
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 Display for MachMemFlags
impl Display for MachMemFlags
impl Eq for MachMemFlags
Source§impl From<MachMemFlags> for MemFlagsData
impl From<MachMemFlags> for MemFlagsData
Source§fn from(flags: MachMemFlags) -> Self
fn from(flags: MachMemFlags) -> Self
Converts to this type from the input type.
Source§impl From<MemFlagsData> for MachMemFlags
impl From<MemFlagsData> for MachMemFlags
Source§fn from(flags: MemFlagsData) -> Self
fn from(flags: MemFlagsData) -> Self
Converts to this type from the input type.
Source§impl Hash for MachMemFlags
impl Hash for MachMemFlags
Source§impl PartialEq for MachMemFlags
impl PartialEq for MachMemFlags
Source§fn eq(&self, other: &MachMemFlags) -> bool
fn eq(&self, other: &MachMemFlags) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MachMemFlags
impl Serialize for MachMemFlags
impl StructuralPartialEq for MachMemFlags
Auto Trait Implementations§
impl Freeze for MachMemFlags
impl RefUnwindSafe for MachMemFlags
impl Send for MachMemFlags
impl Sync for MachMemFlags
impl Unpin for MachMemFlags
impl UnsafeUnpin for MachMemFlags
impl UnwindSafe for MachMemFlags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.