pub struct StackReq { /* private fields */ }
Expand description

Stack allocation requirements.

Implementations

Allocation requirements sufficient for n elements of type T, overaligned with alignment align.

Panics
  • if align is smaller than the minimum required alignment for an object of type T.
  • if align is not a power of two.
  • if the size computation overflows

Allocation requirements sufficient for n elements of type T.

Panics
  • if the size computation overflows

Same as StackReq::new_aligned, but returns an error in case the size computation overflows.

Panics
  • if align is smaller than the minimum required alignment for an object of type T.
  • if align is not a power of two.

Same as StackReq::new, but returns an error in case the size computation overflows.

The number of allocated bytes required, aligned to self.align_bytes().

The alignment of allocated bytes required.

The number of allocated bytes required, with no alignment constraints.

Panics
  • if the size computation overflows

Same as StackReq::unaligned_bytes_required, but returns an error if the size computation overflows.

The required allocation to allocate storage sufficient for both of self and other, simultaneously and in any order.

Panics
  • if the allocation requirement computation overflows.

The required allocation to allocate storage sufficient for either of self and other, with only one being active at a time.

Panics
  • if the allocation requirement computation overflows.

Same as StackReq::and, but returns an error if the size computation overflows.

Same as StackReq::or, but returns an error if the size computation overflows.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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 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)

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.