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 VirtualAddress
pub fn offset_from_start_of_page(self) -> usize
[src]
pub fn offset_from_start_of_page(self) -> usize
Relative 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) -> Self
The 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 VirtualAddress
fn default() -> VirtualAddress
[src]
fn default() -> VirtualAddress
Returns the "default value" for a type. Read more
impl Debug for VirtualAddress
[src]
impl Debug for VirtualAddress
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for VirtualAddress
[src]
impl Copy for VirtualAddress
impl Clone for VirtualAddress
[src]
impl Clone for VirtualAddress
fn clone(&self) -> VirtualAddress
[src]
fn clone(&self) -> VirtualAddress
Returns 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 VirtualAddress
fn cmp(&self, other: &VirtualAddress) -> Ordering
[src]
fn cmp(&self, other: &VirtualAddress) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for VirtualAddress
[src]
impl PartialOrd for VirtualAddress
fn 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) -> bool
This 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) -> bool
This 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) -> bool
This 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) -> bool
This 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 VirtualAddress
impl PartialEq for VirtualAddress
[src]
impl PartialEq for VirtualAddress
fn eq(&self, other: &VirtualAddress) -> bool
[src]
fn eq(&self, other: &VirtualAddress) -> bool
This 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) -> bool
This method tests for !=
.
impl Hash for VirtualAddress
[src]
impl Hash for VirtualAddress
fn 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 VirtualAddress
impl<T> From<Option<NonNull<T>>> for VirtualAddress
[src]
impl<T> From<Option<NonNull<T>>> for VirtualAddress
impl<T> Into<Option<NonNull<T>>> for VirtualAddress
[src]
impl<T> Into<Option<NonNull<T>>> for VirtualAddress
impl<'a, T: 'a> From<&'a T> for VirtualAddress
[src]
impl<'a, T: 'a> From<&'a T> for VirtualAddress
impl<'a, T: 'a> From<&'a mut T> for VirtualAddress
[src]
impl<'a, T: 'a> From<&'a mut T> for VirtualAddress
impl<T> From<*const T> for VirtualAddress
[src]
impl<T> From<*const T> for VirtualAddress
impl<T> Into<*const T> for VirtualAddress
[src]
impl<T> Into<*const T> for VirtualAddress
impl<T> From<*mut T> for VirtualAddress
[src]
impl<T> From<*mut T> for VirtualAddress
impl<T> Into<*mut T> for VirtualAddress
[src]
impl<T> Into<*mut T> for VirtualAddress
impl From<usize> for VirtualAddress
[src]
impl From<usize> for VirtualAddress
impl Into<usize> for VirtualAddress
[src]
impl Into<usize> for VirtualAddress
impl Add<usize> for VirtualAddress
[src]
impl Add<usize> for VirtualAddress
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: usize) -> Self::Output
[src]
fn add(self, rhs: usize) -> Self::Output
Performs the +
operation.
impl AddAssign<usize> for VirtualAddress
[src]
impl AddAssign<usize> for VirtualAddress
fn 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 VirtualAddress
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: usize) -> Self::Output
[src]
fn sub(self, rhs: usize) -> Self::Output
Performs the -
operation.
impl SubAssign<usize> for VirtualAddress
[src]
impl SubAssign<usize> for VirtualAddress
fn 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 VirtualPageFrameNumber
fn from(value: VirtualAddress) -> Self
[src]
fn from(value: VirtualAddress) -> Self
Performs the conversion.
Auto Trait Implementations
impl Send for VirtualAddress
impl Send for VirtualAddress
impl Sync for VirtualAddress
impl Sync for VirtualAddress