pub struct ArchitectureSize {
pub bytes: usize,
pub pointers: usize,
}
Expand description
Architecture specific measurement of position,
the combined amount in bytes is
bytes + pointers * core::mem::size_of::<*const u8>()
Fields§
§bytes: usize
architecture independent bytes
pointers: usize
amount of pointer sized units to add
Implementations§
Source§impl ArchitectureSize
impl ArchitectureSize
pub fn new(bytes: usize, pointers: usize) -> Self
pub fn max<B: Borrow<Self>>(&self, other: B) -> Self
pub fn add_bytes(&self, b: usize) -> Self
Sourcepub fn constant_bytes(&self) -> usize
pub fn constant_bytes(&self) -> usize
The effective offset/size is
constant_bytes() + core::mem::size_of::<*const u8>() * pointers_to_add()
pub fn pointers_to_add(&self) -> usize
Sourcepub fn size_wasm32(&self) -> usize
pub fn size_wasm32(&self) -> usize
Shortcut for compatibility with previous versions
pub fn size_wasm64(&self) -> usize
pub fn format(&self, ptrsize_expr: &str) -> String
Trait Implementations§
Source§impl Add for ArchitectureSize
impl Add for ArchitectureSize
Source§type Output = ArchitectureSize
type Output = ArchitectureSize
The resulting type after applying the
+
operator.Source§impl AddAssign for ArchitectureSize
impl AddAssign for ArchitectureSize
Source§fn add_assign(&mut self, rhs: ArchitectureSize)
fn add_assign(&mut self, rhs: ArchitectureSize)
Performs the
+=
operation. Read moreSource§impl Clone for ArchitectureSize
impl Clone for ArchitectureSize
Source§fn clone(&self) -> ArchitectureSize
fn clone(&self) -> ArchitectureSize
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ArchitectureSize
impl Debug for ArchitectureSize
Source§impl Default for ArchitectureSize
impl Default for ArchitectureSize
Source§fn default() -> ArchitectureSize
fn default() -> ArchitectureSize
Returns the “default value” for a type. Read more
Source§impl From<Alignment> for ArchitectureSize
impl From<Alignment> for ArchitectureSize
Source§impl PartialEq for ArchitectureSize
impl PartialEq for ArchitectureSize
impl Copy for ArchitectureSize
impl Eq for ArchitectureSize
impl StructuralPartialEq for ArchitectureSize
Auto Trait Implementations§
impl Freeze for ArchitectureSize
impl RefUnwindSafe for ArchitectureSize
impl Send for ArchitectureSize
impl Sync for ArchitectureSize
impl Unpin for ArchitectureSize
impl UnwindSafe for ArchitectureSize
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.