pub struct VecLayout;Expand description
Enables storing a vector into an ArcSlice without requiring the allocation of an inner Arc,
as long as there is a single instance.
As soon as the ArcSlice is cloned (or subsliced), then an inner Arc is allocated. As a
consequence, when oom-handling feature is not enabled,
ArcSlice<S, VecLayout> doesn’t implement Clone.
assert_eq!(size_of::<ArcBytes<VecLayout>>(), 4 * size_of::<usize>());
assert_eq!(size_of::<ArcBytesMut<VecLayout>>(), 4 * size_of::<usize>());Trait Implementations§
impl AnyBufferLayout for VecLayout
impl Layout for VecLayout
impl LayoutMut for VecLayout
impl StaticLayout for VecLayout
impl TruncateNoAllocLayout for VecLayout
Auto Trait Implementations§
impl Freeze for VecLayout
impl RefUnwindSafe for VecLayout
impl Send for VecLayout
impl Sync for VecLayout
impl Unpin for VecLayout
impl UnwindSafe for VecLayout
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