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

Calculates the layout of the object, returning None if any of the calculated sizes or offsets would overflow usize. Read more

Populates the destination pointer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.