pub struct OwnedSlice<'a, T: 'a + Sized> { /* private fields */ }
Expand description

Wrap a slice and convert to a Vec on serialize. We use a hidden inner enum so the public API can be safe, unless the user uses the unsafe OwnedSlice::from_raw_parts

Implementations

Create a new OwnedSlice from a raw pointer and length

Safety

The pointer must be valid and point to a map of the size size_of<T>() * len The contents will be dereferenced in subsequent operations.

Trait Implementations

Get the OwnedSlice as slice.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Create a new OwnedSlice from a reference to a slice

Converts to this type from the input type.

Create a new OwnedSlice from a vector reference

Converts to this type from the input type.

Create a new OwnedSlice from a OwnedSliceMut

Converts to this type from the input type.

Create a new OwnedSlice from a vector

Converts to this type from the input type.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Returns if the current type is an owned type.

Transfer the current type into an owned type.

Serialize this value into the given Serde serializer. 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 Resulting TupleList, of an Prepend::prepend() call, including the prepended entry. Read more

Prepend a value to this tuple, returning a new tuple with prepended value.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.