Struct dpdk_unix::memory_information::VirtualAddress [−][src]
pub struct VirtualAddress(_);
A virtual address.
This is the same as the value returned from malloc(), a *mut T pointer, a &T reference, etc.
No checks are made for its validity.
Methods
impl VirtualAddress[src]
impl VirtualAddresspub fn offset_from_start_of_page(self) -> usize[src]
pub fn offset_from_start_of_page(self) -> usizeRelative offset from the start of the system page containing this virtual address.
May be zero, but will always be less than the system page size.
pub fn first_address_in_page(self) -> Self[src]
pub fn first_address_in_page(self) -> SelfThe address of the page which contains this physical address. May be the same value.
pub fn virtual_addresses_to_physical_addresses<HVA: HasVirtualAddress>(
have_virtual_addresses: impl Iterator<Item = HVA>,
physical_address_user: impl FnMut(HVA, Self, PhysicalAddress)
)[src]
pub fn virtual_addresses_to_physical_addresses<HVA: HasVirtualAddress>(
have_virtual_addresses: impl Iterator<Item = HVA>,
physical_address_user: impl FnMut(HVA, Self, PhysicalAddress)
)This function will translate virtual addresses to physical addresses.
Before using this function, the memory reference by a virtual address should have been mlock()'d.
Trait Implementations
impl Default for VirtualAddress[src]
impl Default for VirtualAddressfn default() -> VirtualAddress[src]
fn default() -> VirtualAddressReturns the "default value" for a type. Read more
impl Debug for VirtualAddress[src]
impl Debug for VirtualAddressfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Copy for VirtualAddress[src]
impl Copy for VirtualAddressimpl Clone for VirtualAddress[src]
impl Clone for VirtualAddressfn clone(&self) -> VirtualAddress[src]
fn clone(&self) -> VirtualAddressReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Ord for VirtualAddress[src]
impl Ord for VirtualAddressfn cmp(&self, other: &VirtualAddress) -> Ordering[src]
fn cmp(&self, other: &VirtualAddress) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl PartialOrd for VirtualAddress[src]
impl PartialOrd for VirtualAddressfn partial_cmp(&self, other: &VirtualAddress) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &VirtualAddress) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &VirtualAddress) -> bool[src]
fn lt(&self, other: &VirtualAddress) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &VirtualAddress) -> bool[src]
fn le(&self, other: &VirtualAddress) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &VirtualAddress) -> bool[src]
fn gt(&self, other: &VirtualAddress) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &VirtualAddress) -> bool[src]
fn ge(&self, other: &VirtualAddress) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Eq for VirtualAddress[src]
impl Eq for VirtualAddressimpl PartialEq for VirtualAddress[src]
impl PartialEq for VirtualAddressfn eq(&self, other: &VirtualAddress) -> bool[src]
fn eq(&self, other: &VirtualAddress) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &VirtualAddress) -> bool[src]
fn ne(&self, other: &VirtualAddress) -> boolThis method tests for !=.
impl Hash for VirtualAddress[src]
impl Hash for VirtualAddressfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl<T> From<NonNull<T>> for VirtualAddress[src]
impl<T> From<NonNull<T>> for VirtualAddressimpl<T> From<Option<NonNull<T>>> for VirtualAddress[src]
impl<T> From<Option<NonNull<T>>> for VirtualAddressimpl<T> Into<Option<NonNull<T>>> for VirtualAddress[src]
impl<T> Into<Option<NonNull<T>>> for VirtualAddressimpl<'a, T: 'a> From<&'a T> for VirtualAddress[src]
impl<'a, T: 'a> From<&'a T> for VirtualAddressimpl<'a, T: 'a> From<&'a mut T> for VirtualAddress[src]
impl<'a, T: 'a> From<&'a mut T> for VirtualAddressimpl<T> From<*const T> for VirtualAddress[src]
impl<T> From<*const T> for VirtualAddressimpl<T> Into<*const T> for VirtualAddress[src]
impl<T> Into<*const T> for VirtualAddressimpl<T> From<*mut T> for VirtualAddress[src]
impl<T> From<*mut T> for VirtualAddressimpl<T> Into<*mut T> for VirtualAddress[src]
impl<T> Into<*mut T> for VirtualAddressimpl From<usize> for VirtualAddress[src]
impl From<usize> for VirtualAddressimpl Into<usize> for VirtualAddress[src]
impl Into<usize> for VirtualAddressimpl Add<usize> for VirtualAddress[src]
impl Add<usize> for VirtualAddresstype Output = Self
The resulting type after applying the + operator.
fn add(self, rhs: usize) -> Self::Output[src]
fn add(self, rhs: usize) -> Self::OutputPerforms the + operation.
impl AddAssign<usize> for VirtualAddress[src]
impl AddAssign<usize> for VirtualAddressfn add_assign(&mut self, rhs: usize)[src]
fn add_assign(&mut self, rhs: usize)Performs the += operation.
impl Sub<usize> for VirtualAddress[src]
impl Sub<usize> for VirtualAddresstype Output = Self
The resulting type after applying the - operator.
fn sub(self, rhs: usize) -> Self::Output[src]
fn sub(self, rhs: usize) -> Self::OutputPerforms the - operation.
impl SubAssign<usize> for VirtualAddress[src]
impl SubAssign<usize> for VirtualAddressfn sub_assign(&mut self, rhs: usize)[src]
fn sub_assign(&mut self, rhs: usize)Performs the -= operation.
impl From<VirtualAddress> for VirtualPageFrameNumber[src]
impl From<VirtualAddress> for VirtualPageFrameNumberfn from(value: VirtualAddress) -> Self[src]
fn from(value: VirtualAddress) -> SelfPerforms the conversion.
Auto Trait Implementations
impl Send for VirtualAddress
impl Send for VirtualAddressimpl Sync for VirtualAddress
impl Sync for VirtualAddress