pub struct VCopier<'a, T>(_);
Expand description
An initializer that constructs a bytewise copy of T
.
See VCopy::vcopy
.
Examples
use varlen::prelude::*;
let s1: VBox<Str> = VBox::new(Str::copy("hello"));
let s2: VBox<Str> = VBox::new(s1.vcopy());
Trait Implementations
sourceimpl<'a, T: VCopy<'a>> Initializer<T> for VCopier<'a, T>
impl<'a, T: VCopy<'a>> Initializer<T> for VCopier<'a, T>
sourcefn calculate_layout_cautious(&self) -> Option<T::Layout>
fn calculate_layout_cautious(&self) -> Option<T::Layout>
Calculates the layout of the object, returning None
if any of the calculated sizes
or offsets would overflow usize
. Read more
sourceunsafe fn initialize(self, dst: NonNull<T>, layout: T::Layout)
unsafe fn initialize(self, dst: NonNull<T>, layout: T::Layout)
Populates the destination pointer. Read more
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for VCopier<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for VCopier<'a, T> where
T: Sync,
impl<'a, T> Sync for VCopier<'a, T> where
T: Sync,
impl<'a, T> Unpin for VCopier<'a, T>
impl<'a, T> UnwindSafe for VCopier<'a, T> where
T: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more