pub struct Mapping { /* private fields */ }Expand description
Describes a single memory mapping entry.
The size of this type heavily influences Starnix’s heap usage in common scenarios, please think twice about increasing its size. Compiling in “release” mode includes a compile time check for size increase.
Implementations§
Source§impl Mapping
impl Mapping
pub fn name(&self) -> MappingName
pub fn set_name(&mut self, new: MappingName)
Source§impl Mapping
impl Mapping
pub fn new( backing: MappingBacking, flags: MappingFlags, max_access: Access, ) -> Mapping
pub fn with_name( backing: MappingBacking, flags: MappingFlags, max_access: Access, name: MappingName, ) -> Mapping
pub fn flags(&self) -> MappingFlags
pub fn set_flags(&mut self, new_flags: MappingFlags)
pub fn max_access(&self) -> Access
pub fn get_backing_internal(&self) -> &MappingBacking
pub fn set_backing_internal(&mut self, backing: MappingBacking)
pub fn set_uffd(&mut self, mode: FaultRegisterMode)
pub fn clear_uffd(&mut self)
pub fn set_mlock(&mut self)
pub fn clear_mlock(&mut self)
pub fn new_private_anonymous(flags: MappingFlags, name: MappingName) -> Mapping
pub fn inflate_to_include_guard_pages( &self, range: &Range<UserAddress>, ) -> Range<UserAddress>
Sourcepub fn address_to_offset(&self, addr: UserAddress) -> u64
pub fn address_to_offset(&self, addr: UserAddress) -> u64
Converts a UserAddress to an offset in this mapping’s memory object.
pub fn can_read(&self) -> bool
pub fn can_write(&self) -> bool
pub fn can_exec(&self) -> bool
pub fn private_anonymous(&self) -> bool
pub fn vm_flags(&self) -> String
Trait Implementations§
impl Eq for Mapping
Auto Trait Implementations§
impl Freeze for Mapping
impl !RefUnwindSafe for Mapping
impl Send for Mapping
impl Sync for Mapping
impl Unpin for Mapping
impl !UnwindSafe for Mapping
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,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
impl<T, U> MultiArchFrom<T> for Uwhere
U: From<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.