[][src]Struct syscall::flag::PhysallocFlags

pub struct PhysallocFlags { /* fields omitted */ }

Extra flags for physalloc2 or physalloc3.

Implementations

impl PhysallocFlags[src]

pub const SPACE_32: PhysallocFlags[src]

Only allocate memory within the 32-bit physical memory space. This is necessary for some devices may not support 64-bit memory.

pub const SPACE_64: PhysallocFlags[src]

The frame that will be allocated, is going to reside anywhere in 64-bit space. This flag is redundant for the most part, except when overriding some other default.

pub const PARTIAL_ALLOC: PhysallocFlags[src]

Do a "partial allocation", which means that not all of the frames specified in the frame count size actually have to be allocated. This means that if the allocator was unable to find a physical memory range large enough, it can instead return whatever range it decides is optimal. Thus, instead of letting one driver get an expensive 128MiB physical memory range when the physical memory has become fragmented, and failing, it can instead be given a more optimal range. If the device supports scatter-gather lists, then the driver only has to allocate more ranges, and the device will do vectored I/O.

PARTIAL_ALLOC supports different allocation strategies, refer to Optimal, GreatestRange.

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

Returns an empty set of flags

pub const fn all() -> PhysallocFlags[src]

Returns the set containing all flags.

pub const fn bits(&self) -> usize[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: usize) -> Option<PhysallocFlags>[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: usize) -> PhysallocFlags[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: usize) -> PhysallocFlags[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

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: PhysallocFlags) -> bool[src]

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

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

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

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

Inserts the specified flags in-place.

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

Removes the specified flags in-place.

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

Toggles the specified flags in-place.

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

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

Trait Implementations

impl Binary for PhysallocFlags[src]

impl BitAnd<PhysallocFlags> for PhysallocFlags[src]

type Output = PhysallocFlags

The resulting type after applying the & operator.

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

Returns the intersection between the two sets of flags.

impl BitAndAssign<PhysallocFlags> for PhysallocFlags[src]

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

Disables all flags disabled in the set.

impl BitOr<PhysallocFlags> for PhysallocFlags[src]

type Output = PhysallocFlags

The resulting type after applying the | operator.

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

Returns the union of the two sets of flags.

impl BitOrAssign<PhysallocFlags> for PhysallocFlags[src]

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

Adds the set of flags.

impl BitXor<PhysallocFlags> for PhysallocFlags[src]

type Output = PhysallocFlags

The resulting type after applying the ^ operator.

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

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

impl BitXorAssign<PhysallocFlags> for PhysallocFlags[src]

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

Toggles the set of flags.

impl Clone for PhysallocFlags[src]

impl Copy for PhysallocFlags[src]

impl Debug for PhysallocFlags[src]

impl Default for PhysallocFlags[src]

impl Eq for PhysallocFlags[src]

impl Extend<PhysallocFlags> for PhysallocFlags[src]

impl FromIterator<PhysallocFlags> for PhysallocFlags[src]

impl Hash for PhysallocFlags[src]

impl LowerHex for PhysallocFlags[src]

impl Not for PhysallocFlags[src]

type Output = PhysallocFlags

The resulting type after applying the ! operator.

fn not(self) -> PhysallocFlags[src]

Returns the complement of this set of flags.

impl Octal for PhysallocFlags[src]

impl Ord for PhysallocFlags[src]

impl PartialEq<PhysallocFlags> for PhysallocFlags[src]

impl PartialOrd<PhysallocFlags> for PhysallocFlags[src]

impl StructuralEq for PhysallocFlags[src]

impl StructuralPartialEq for PhysallocFlags[src]

impl Sub<PhysallocFlags> for PhysallocFlags[src]

type Output = PhysallocFlags

The resulting type after applying the - operator.

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

Returns the set difference of the two sets of flags.

impl SubAssign<PhysallocFlags> for PhysallocFlags[src]

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

Disables all flags enabled in the set.

impl UpperHex for PhysallocFlags[src]

Auto Trait Implementations

impl Send for PhysallocFlags

impl Sync for PhysallocFlags

impl Unpin for PhysallocFlags

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, 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.