[−][src]Struct sunrise_libkern::MemoryState
Represents the current state of a memory region: why is it allocated, and what operations are allowed.
Fields
bits: u32
Implementations
impl MemoryState
[src]
pub const TY: MemoryState
[src]
The low 8 bits are used to keep the type.
pub const PERMISSION_CHANGE_ALLOWED: MemoryState
[src]
Allows the use of svcSetMemoryPermissions
on this memory region.
pub const FORCE_READ_WRITABLE_BY_DEBUG_SYSCALLS: MemoryState
[src]
Allow writing to read-only segments with svcWriteDebugProcessMemory
.
pub const IPC_SEND_ALLOWED: MemoryState
[src]
Allows sending this region over IPC.
pub const NON_DEVICE_IPC_SEND_ALLOWED: MemoryState
[src]
Allows sending this region over IPC with buffer flag set to 1.
pub const NON_SECURE_IPC_SEND_ALLOWED: MemoryState
[src]
Allows sending this region over IPC with buffer flag set to 3.
pub const PROCESS_PERMISSION_CHANGE_ALLOWED: MemoryState
[src]
Allows the use of svcSetProcessMemoryPermission
on this memory region.
pub const MAP_ALLOWED: MemoryState
[src]
Allows remapping this memory region with svcMapMemory
.
pub const UNMAP_PROCESS_CODE_MEMORY_ALLOWED: MemoryState
[src]
Allows unmapping this memory region through svcUnmapProcessCodeMemory
.
pub const TRANSFER_MEMORY_ALLOWED: MemoryState
[src]
Allows creating Transfer Memory from this memory region with
svcCreateTransferMemory
.
pub const QUERY_PHYSICAL_ADDRESS_ALLOWED: MemoryState
[src]
Allows using query_physical_memory on this memory region.
pub const MAP_DEVICE_ALLOWED: MemoryState
[src]
Allows mapping this memory region to a DeviceAddressSpace through either
svcMapDeviceAddressSpace
or svcMapDeviceAddressSpaceByForce
.
pub const MAP_DEVICE_ALIGNED_ALLOWED: MemoryState
[src]
Allows mapping this memory region to a DeviceAddressSpace through
svcMapDeviceAddressSpaceAligned
.
pub const IPC_BUFFER_ALLOWED: MemoryState
[src]
Allows using this memory region as an IPC Command Buffer.
pub const IS_REFERENCE_COUNTED: MemoryState
[src]
If true, this memory region is reference counted/pool-allocated.
pub const MAP_PROCESS_ALLOWED: MemoryState
[src]
Allows mapping this region accross process boundary through
svcMapProcessMemory
pub const ATTRIBUTE_CHANGE_ALLOWED: MemoryState
[src]
Allows using the svcSetMemoryAttribute
syscall on this memory region.
pub const CODE_MEMORY_ALLOWED: MemoryState
[src]
Allows creating a CodeMemory backed by this memory region.
pub const ALL_IPC_SEND_ALLOWED: MemoryState
[src]
All IPC Buffer Send permissions are allowed by this type.
pub const CAN_IOMMU: MemoryState
[src]
This type can use all IOMMU-related permissions (MapDevice allowed, MapDeviceAligned allowed, and QueryPhysicalAddress allowed).
pub const fn empty() -> MemoryState
[src]
Returns an empty set of flags
pub const fn all() -> MemoryState
[src]
Returns the set containing all flags.
pub const fn bits(&self) -> u32
[src]
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u32) -> Option<MemoryState>
[src]
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u32) -> MemoryState
[src]
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const fn is_empty(&self) -> bool
[src]
Returns true
if no flags are currently stored.
pub const fn is_all(&self) -> bool
[src]
Returns true
if all flags are currently set.
pub const fn intersects(&self, other: MemoryState) -> bool
[src]
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: MemoryState) -> bool
[src]
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: MemoryState)
[src]
Inserts the specified flags in-place.
pub fn remove(&mut self, other: MemoryState)
[src]
Removes the specified flags in-place.
pub fn toggle(&mut self, other: MemoryState)
[src]
Toggles the specified flags in-place.
pub fn set(&mut self, other: MemoryState, value: bool)
[src]
Inserts or removes the specified flags depending on the passed value.
impl MemoryState
[src]
pub fn ty(self) -> MemoryType
[src]
MemoryType this state represents.
Trait Implementations
impl Binary for MemoryState
[src]
impl BitAnd<MemoryState> for MemoryState
[src]
type Output = MemoryState
The resulting type after applying the &
operator.
fn bitand(self, other: MemoryState) -> MemoryState
[src]
Returns the intersection between the two sets of flags.
impl BitAndAssign<MemoryState> for MemoryState
[src]
fn bitand_assign(&mut self, other: MemoryState)
[src]
Disables all flags disabled in the set.
impl BitOr<MemoryState> for MemoryState
[src]
type Output = MemoryState
The resulting type after applying the |
operator.
fn bitor(self, other: MemoryState) -> MemoryState
[src]
Returns the union of the two sets of flags.
impl BitOrAssign<MemoryState> for MemoryState
[src]
fn bitor_assign(&mut self, other: MemoryState)
[src]
Adds the set of flags.
impl BitXor<MemoryState> for MemoryState
[src]
type Output = MemoryState
The resulting type after applying the ^
operator.
fn bitxor(self, other: MemoryState) -> MemoryState
[src]
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign<MemoryState> for MemoryState
[src]
fn bitxor_assign(&mut self, other: MemoryState)
[src]
Toggles the set of flags.
impl Clone for MemoryState
[src]
fn clone(&self) -> MemoryState
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MemoryState
[src]
impl Debug for MemoryState
[src]
impl Default for MemoryState
[src]
fn default() -> MemoryState
[src]
impl Eq for MemoryState
[src]
impl Extend<MemoryState> for MemoryState
[src]
fn extend<T: IntoIterator<Item = MemoryState>>(&mut self, iterator: T)
[src]
impl FromIterator<MemoryState> for MemoryState
[src]
fn from_iter<T: IntoIterator<Item = MemoryState>>(iterator: T) -> MemoryState
[src]
impl Hash for MemoryState
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl LowerHex for MemoryState
[src]
impl Not for MemoryState
[src]
type Output = MemoryState
The resulting type after applying the !
operator.
fn not(self) -> MemoryState
[src]
Returns the complement of this set of flags.
impl Octal for MemoryState
[src]
impl Ord for MemoryState
[src]
fn cmp(&self, other: &MemoryState) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<MemoryState> for MemoryState
[src]
fn eq(&self, other: &MemoryState) -> bool
[src]
fn ne(&self, other: &MemoryState) -> bool
[src]
impl PartialOrd<MemoryState> for MemoryState
[src]
fn partial_cmp(&self, other: &MemoryState) -> Option<Ordering>
[src]
fn lt(&self, other: &MemoryState) -> bool
[src]
fn le(&self, other: &MemoryState) -> bool
[src]
fn gt(&self, other: &MemoryState) -> bool
[src]
fn ge(&self, other: &MemoryState) -> bool
[src]
impl StructuralEq for MemoryState
[src]
impl StructuralPartialEq for MemoryState
[src]
impl Sub<MemoryState> for MemoryState
[src]
type Output = MemoryState
The resulting type after applying the -
operator.
fn sub(self, other: MemoryState) -> MemoryState
[src]
Returns the set difference of the two sets of flags.
impl SubAssign<MemoryState> for MemoryState
[src]
fn sub_assign(&mut self, other: MemoryState)
[src]
Disables all flags enabled in the set.
impl UpperHex for MemoryState
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,