[][src]Struct sunrise_kernel::paging::MappingAccessRights

pub struct MappingAccessRights {
    bits: u32,
}

The flags of a mapping.

Fields

bits: u32

Implementations

impl MappingAccessRights[src]

pub const READABLE: MappingAccessRights[src]

Mapping is readable.

pub const WRITABLE: MappingAccessRights[src]

Mapping is writable.

pub const EXECUTABLE: MappingAccessRights[src]

Mapping is executable.

pub const USER_ACCESSIBLE: MappingAccessRights[src]

Mapping can be accessed from userland, with the same permissions as the kernel.

pub const fn empty() -> MappingAccessRights[src]

Returns an empty set of flags

pub const fn all() -> MappingAccessRights[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<MappingAccessRights>[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) -> MappingAccessRights[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: MappingAccessRights) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: MappingAccessRights) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: MappingAccessRights)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: MappingAccessRights)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: MappingAccessRights)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: MappingAccessRights, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

impl MappingAccessRights[src]

pub fn k_r() -> MappingAccessRights[src]

Shorthand for READABLE

pub fn k_w() -> MappingAccessRights[src]

Shorthand for WRITABLE

pub fn k_rw() -> MappingAccessRights[src]

Shorthand for READABLE | WRITABLE

pub fn k_rx() -> MappingAccessRights[src]

Shorthand for READABLE | EXECUTABLE

pub fn u_r() -> MappingAccessRights[src]

Shorthand for USER_ACCESSIBLE | READABLE

pub fn u_w() -> MappingAccessRights[src]

Shorthand for USER_ACCESSIBLE | WRITABLE

pub fn u_rw() -> MappingAccessRights[src]

Shorthand for USER_ACCESSIBLE | WRITABLE

pub fn u_rx() -> MappingAccessRights[src]

Shorthand for USER_ACCESSIBLE | WRITABLE

Trait Implementations

impl Binary for MappingAccessRights[src]

impl BitAnd<MappingAccessRights> for MappingAccessRights[src]

type Output = MappingAccessRights

The resulting type after applying the & operator.

fn bitand(self, other: MappingAccessRights) -> MappingAccessRights[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<MappingAccessRights> for MappingAccessRights[src]

fn bitand_assign(&mut self, other: MappingAccessRights)[src]

Disables all flags disabled in the set.

impl BitOr<MappingAccessRights> for MappingAccessRights[src]

type Output = MappingAccessRights

The resulting type after applying the | operator.

fn bitor(self, other: MappingAccessRights) -> MappingAccessRights[src]

Returns the union of the two sets of flags.

impl BitOrAssign<MappingAccessRights> for MappingAccessRights[src]

fn bitor_assign(&mut self, other: MappingAccessRights)[src]

Adds the set of flags.

impl BitXor<MappingAccessRights> for MappingAccessRights[src]

type Output = MappingAccessRights

The resulting type after applying the ^ operator.

fn bitxor(self, other: MappingAccessRights) -> MappingAccessRights[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<MappingAccessRights> for MappingAccessRights[src]

fn bitxor_assign(&mut self, other: MappingAccessRights)[src]

Toggles the set of flags.

impl Clone for MappingAccessRights[src]

impl Copy for MappingAccessRights[src]

impl Debug for MappingAccessRights[src]

impl Eq for MappingAccessRights[src]

impl Extend<MappingAccessRights> for MappingAccessRights[src]

impl From<MappingAccessRights> for I386EntryFlags[src]

impl From<MappingAccessRights> for MemoryPermissions[src]

impl From<MemoryPermissions> for MappingAccessRights[src]

impl FromIterator<MappingAccessRights> for MappingAccessRights[src]

impl Hash for MappingAccessRights[src]

impl LowerHex for MappingAccessRights[src]

impl Not for MappingAccessRights[src]

type Output = MappingAccessRights

The resulting type after applying the ! operator.

fn not(self) -> MappingAccessRights[src]

Returns the complement of this set of flags.

impl Octal for MappingAccessRights[src]

impl Ord for MappingAccessRights[src]

impl PartialEq<MappingAccessRights> for MappingAccessRights[src]

impl PartialOrd<MappingAccessRights> for MappingAccessRights[src]

impl StructuralEq for MappingAccessRights[src]

impl StructuralPartialEq for MappingAccessRights[src]

impl Sub<MappingAccessRights> for MappingAccessRights[src]

type Output = MappingAccessRights

The resulting type after applying the - operator.

fn sub(self, other: MappingAccessRights) -> MappingAccessRights[src]

Returns the set difference of the two sets of flags.

impl SubAssign<MappingAccessRights> for MappingAccessRights[src]

fn sub_assign(&mut self, other: MappingAccessRights)[src]

Disables all flags enabled in the set.

impl UpperHex for MappingAccessRights[src]

Auto Trait Implementations

impl RefUnwindSafe for MappingAccessRights

impl Send for MappingAccessRights

impl Sync for MappingAccessRights

impl Unpin for MappingAccessRights

impl UnwindSafe for MappingAccessRights

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.