Struct varlen::FixedLenCloner
source · [−]pub struct FixedLenCloner<'a, T>(_);
Expand description
Initializer that clones from a FixedLen<T>
.
Examples
use varlen::prelude::*;
let orig = FixedLen(4u16);
let the_clone = VBox::new(orig.vclone());
assert_eq!(orig.0, the_clone.0);
Trait Implementations
sourceimpl<'a, T: Clone> Initializer<FixedLen<T>> for FixedLenCloner<'a, T>
impl<'a, T: Clone> Initializer<FixedLen<T>> for FixedLenCloner<'a, T>
sourcefn calculate_layout_cautious(&self) -> Option<FixedLenLayout<T>>
fn calculate_layout_cautious(&self) -> Option<FixedLenLayout<T>>
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<FixedLen<T>>,
_layout: FixedLenLayout<T>
)
unsafe fn initialize(
self,
dst: NonNull<FixedLen<T>>,
_layout: FixedLenLayout<T>
)
Populates the destination pointer. Read more
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for FixedLenCloner<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for FixedLenCloner<'a, T> where
T: Sync,
impl<'a, T> Sync for FixedLenCloner<'a, T> where
T: Sync,
impl<'a, T> Unpin for FixedLenCloner<'a, T>
impl<'a, T> UnwindSafe for FixedLenCloner<'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