pub struct HeapByteArray<const LENGTH: usize>(_);
This is supported on crate feature nightly
only.
Expand description
A heap-allocated fixed-length byte array, using the
page-aligned allocator. Required for working with
protected memory regions. Wraps a Vec
with custom Allocator
implementation.
Returns a reference to the underlying fixed-length byte array.
Returns a slice of the underlying bytes.
Shorthand to retrieve the underlying length of the byte array.
Returns true if the array is empty.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
The resulting type after dereferencing.
Mutably dereferences the value.
Executes the destructor for this type. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Performs the mutable indexing (container[index]
) operation. Read more
Returns a mutable reference to the underlying fixed-length byte array.
Returns a mutable slice to the underlying bytes.
Copies into the underlying slice from other
. Panics if lengths do not
match. Read more
Returns a new byte array filled with random data.
Returns a new fixed-length byte array, initialized with zeroes.
Returns an empty, unallocated, arbitrary-length byte array.
Returns a new locked byte array from other
. Panics if sizes do not
match.
Returns a new read-only locked region of memory from src
.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Serialize this value into the given Serde serializer. Read more
The type returned in the event of a conversion error.
Zero out this object from memory using Rust intrinsics which ensure the
zeroization operation is not “optimized away” by the compiler. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
This is supported on crate feature nightly
only.
Returns a new locked byte array.
This is supported on crate feature nightly
only.
Returns a new locked byte array.
This is supported on crate feature nightly
only.
Returns a new locked byte array, filled with random data.
This is supported on crate feature nightly
only.
Returns a new read-only, locked byte array, filled with random data.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.