Enum ResponseStatus

Source
#[repr(u16)]
pub enum ResponseStatus {
Show 44 variants Success = 0, WrongProviderId = 1, ContentTypeNotSupported = 2, AcceptTypeNotSupported = 3, WireProtocolVersionNotSupported = 4, ProviderNotRegistered = 5, ProviderDoesNotExist = 6, DeserializingBodyFailed = 7, SerializingBodyFailed = 8, OpcodeDoesNotExist = 9, ResponseTooLarge = 10, AuthenticationError = 11, AuthenticatorDoesNotExist = 12, AuthenticatorNotRegistered = 13, KeyInfoManagerError = 14, ConnectionError = 15, InvalidEncoding = 16, InvalidHeader = 17, WrongProviderUuid = 18, NotAuthenticated = 19, BodySizeExceedsLimit = 20, AdminOperation = 21, DeprecatedPrimitive = 22, PsaErrorGenericError = 1_132, PsaErrorNotSupported = 1_134, PsaErrorNotPermitted = 1_133, PsaErrorBufferTooSmall = 1_138, PsaErrorAlreadyExists = 1_139, PsaErrorDoesNotExist = 1_140, PsaErrorBadState = 1_137, PsaErrorInvalidArgument = 1_135, PsaErrorInsufficientMemory = 1_141, PsaErrorInsufficientStorage = 1_142, PsaErrorCommunicationFailure = 1_145, PsaErrorStorageFailure = 1_146, PsaErrorDataCorrupt = 1_152, PsaErrorDataInvalid = 1_153, PsaErrorHardwareFailure = 1_147, PsaErrorCorruptionDetected = 1_151, PsaErrorInsufficientEntropy = 1_148, PsaErrorInvalidSignature = 1_149, PsaErrorInvalidPadding = 1_150, PsaErrorInsufficientData = 1_143, PsaErrorInvalidHandle = 1_136,
}
Expand description

C-like enum mapping response status options to their code.

See the status code page for a broader description of these codes.

Variants§

§

Success = 0

Successful operation

§

WrongProviderId = 1

Requested provider ID does not match that of the backend

§

ContentTypeNotSupported = 2

Requested content type is not supported by the backend

§

AcceptTypeNotSupported = 3

Requested accept type is not supported by the backend

§

WireProtocolVersionNotSupported = 4

Requested version is not supported by the backend

§

ProviderNotRegistered = 5

No provider registered for the requested provider ID

§

ProviderDoesNotExist = 6

No provider defined for requested provider ID

§

DeserializingBodyFailed = 7

Failed to deserialize the body of the message

§

SerializingBodyFailed = 8

Failed to serialize the body of the message

§

OpcodeDoesNotExist = 9

Requested operation is not defined

§

ResponseTooLarge = 10

Response size exceeds allowed limits

§

AuthenticationError = 11

Authentication failed

§

AuthenticatorDoesNotExist = 12

Authenticator not supported

§

AuthenticatorNotRegistered = 13

Authenticator not supported

§

KeyInfoManagerError = 14

Internal error in the Key Info Manager

§

ConnectionError = 15

Generic input/output error

§

InvalidEncoding = 16

Invalid value for this data type

§

InvalidHeader = 17

Constant fields in header are invalid

§

WrongProviderUuid = 18

The UUID vector needs to only contain 16 bytes

§

NotAuthenticated = 19

Request did not provide a required authentication

§

BodySizeExceedsLimit = 20

Request length specified in the header is above defined limit

§

AdminOperation = 21

The operation requires admin privilege

§

DeprecatedPrimitive = 22

The key template contains a deprecated type or algorithm

§

PsaErrorGenericError = 1_132

An error occurred that does not correspond to any defined failure cause

§

PsaErrorNotSupported = 1_134

The requested operation or a parameter is not supported by this implementation

§

PsaErrorNotPermitted = 1_133

The requested action is denied by a policy

§

PsaErrorBufferTooSmall = 1_138

An output buffer is too small

§

PsaErrorAlreadyExists = 1_139

Asking for an item that already exists

§

PsaErrorDoesNotExist = 1_140

Asking for an item that doesn’t exist

§

PsaErrorBadState = 1_137

The requested action cannot be performed in the current state

§

PsaErrorInvalidArgument = 1_135

The parameters passed to the function are invalid

§

PsaErrorInsufficientMemory = 1_141

There is not enough runtime memory

§

PsaErrorInsufficientStorage = 1_142

There is not enough persistent storage

§

PsaErrorCommunicationFailure = 1_145

There was a communication failure inside the implementation

§

PsaErrorStorageFailure = 1_146

There was a storage failure that may have led to data loss

§

PsaErrorDataCorrupt = 1_152

Stored data has been corrupted

§

PsaErrorDataInvalid = 1_153

Data read from storage is not valid for the implementation

§

PsaErrorHardwareFailure = 1_147

A hardware failure was detected

§

PsaErrorCorruptionDetected = 1_151

A tampering attempt was detected

§

PsaErrorInsufficientEntropy = 1_148

There is not enough entropy to generate random data needed for the requested action

§

PsaErrorInvalidSignature = 1_149

The signature, MAC or hash is incorrect

§

PsaErrorInvalidPadding = 1_150

The decrypted padding is incorrect

§

PsaErrorInsufficientData = 1_143

Insufficient data when attempting to read from a resource

§

PsaErrorInvalidHandle = 1_136

The key handle is not valid

Trait Implementations§

Source§

impl Clone for ResponseStatus

Source§

fn clone(&self) -> ResponseStatus

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResponseStatus

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ResponseStatus

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ResponseStatus

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Box<ErrorKind>> for ResponseStatus

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ResponseStatus

Conversion from a std::io::Error to a ResponseStatus

It allows to easily return a ResponseStatus in case of error when using functions from the standard library.

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ResponseStatus

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for ResponseStatus

Source§

fn from(err: Error) -> ResponseStatus

Converts to this type from the input type.
Source§

impl From<Infallible> for ResponseStatus

Source§

fn from(_err: Infallible) -> Self

Converts to this type from the input type.
Source§

impl From<NulError> for ResponseStatus

Source§

fn from(err: NulError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromIntError> for ResponseStatus

Source§

fn from(err: TryFromIntError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromSliceError> for ResponseStatus

Source§

fn from(err: TryFromSliceError) -> Self

Converts to this type from the input type.
Source§

impl FromPrimitive for ResponseStatus

Source§

fn from_i64(n: i64) -> Option<Self>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u64(n: u64) -> Option<Self>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

impl PartialEq for ResponseStatus

Source§

fn eq(&self, other: &ResponseStatus) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u16> for ResponseStatus

Source§

type Error = ResponseStatus

The type returned in the event of a conversion error.
Source§

fn try_from(value: u16) -> Result<Self>

Performs the conversion.
Source§

impl Copy for ResponseStatus

Source§

impl Eq for ResponseStatus

Source§

impl StructuralPartialEq for ResponseStatus

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.