pub struct VectorAddress(MemoryAddress);
Expand description
Wrapper for vector addresses, with convenience methods for various offsets.
The vector consists of a ref-count, followed by the capacity, and then a number of items indicated by the capacity.
The semantic length of the vector is maintained at a separate address.
Tuple Fields§
§0: MemoryAddress
Implementations§
Source§impl VectorAddress
impl VectorAddress
Sourcepub fn size_addr(&self) -> MemoryAddress
pub fn size_addr(&self) -> MemoryAddress
Capacity of the vector.
pub fn items_start(&self) -> MemoryAddress
Trait Implementations§
Source§impl From<MemoryAddress> for VectorAddress
impl From<MemoryAddress> for VectorAddress
Source§fn from(value: MemoryAddress) -> Self
fn from(value: MemoryAddress) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for VectorAddress
impl RefUnwindSafe for VectorAddress
impl Send for VectorAddress
impl Sync for VectorAddress
impl Unpin for VectorAddress
impl UnwindSafe for VectorAddress
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> 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 more