Skip to main content

SecretStringBuildError

Type Alias SecretStringBuildError 

Source
pub type SecretStringBuildError = SecretSliceAllocationError;
Expand description

Byte-limit and exact-allocation errors for boxed UTF-8 text.

Aliased Type§

pub enum SecretStringBuildError {
    TooLong {
        maximum: usize,
        actual: usize,
    },
    Allocation(TryReserveError),
    NonExactCapacity {
        requested: usize,
        actual: usize,
    },
}

Variants§

§

TooLong

The requested public length exceeded the compile-time maximum.

Fields

§maximum: usize

Maximum accepted byte length.

§actual: usize

Rejected requested byte length.

§

Allocation(TryReserveError)

The allocator could not reserve the requested byte length.

§

NonExactCapacity

The allocator exposed more logical capacity than requested.

The allocation is released before it receives secret input.

Fields

§requested: usize

Requested byte length.

§actual: usize

Capacity returned by the allocator.