pub struct StrCloner<'a, Len: ArrayLen>(_);
Expand description
Initializer type for cloning an array.
Prefer to use Str::vcopy()
over Str::vclone()
where possible.
Examples
use varlen::prelude::*;
let arr = VBox::new(Str::copy("hello"));
let seq: Seq<Str> = seq![arr.vclone(), arr.vclone(), arr.vclone()]; // Clones the string
for a in seq.iter() {
assert_eq!(&a[..], "hello");
}
Trait Implementations
Auto Trait Implementations
impl<'a, Len> RefUnwindSafe for StrCloner<'a, Len> where
Len: RefUnwindSafe,
impl<'a, Len> Send for StrCloner<'a, Len> where
Len: Send,
impl<'a, Len> Sync for StrCloner<'a, Len> where
Len: Sync,
impl<'a, Len> Unpin for StrCloner<'a, Len> where
Len: Unpin,
impl<'a, Len> UnwindSafe for StrCloner<'a, Len> where
Len: UnwindSafe,
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