Skip to main content

ProtocolErrorCode

Enum ProtocolErrorCode 

Source
pub enum ProtocolErrorCode {
Show 14 variants InvalidRequest, NotFound, InterfaceNotFound, InterfaceMismatch, OperationNotFound, InvalidArguments, ValidatorRequired, ValidatorMismatch, InterfaceValidatorRequired, InterfaceValidatorMismatch, PermissionDenied, ResourceLimitExceeded, Internal, OperationOutcomeUnknown,
}
Expand description

Stable protocol failure code returned by a host.

This is the complete wire-level code set. A Client treats a malformed success or failure response, including a code disallowed for its interaction, as a Client-local InvalidResponse. An unsupported descriptor format is likewise a Client-local UnsupportedDescriptorFormat; neither condition is a code a Host can return.

Variants§

§

InvalidRequest

The request is structurally invalid before an operation descriptor is fixed.

§

NotFound

The target object is not published.

§

InterfaceNotFound

The interface reference is not currently published.

§

InterfaceMismatch

The selected interface is not on the current object.

§

OperationNotFound

The selected operation is not declared by the current interface.

§

InvalidArguments

Supplied arguments do not match the fixed operation declaration.

§

ValidatorRequired

The operation requires an object validator and none was supplied.

§

ValidatorMismatch

The supplied object validator does not match current state.

§

InterfaceValidatorRequired

A mutable interface requires its validator and none was supplied.

§

InterfaceValidatorMismatch

The supplied interface validator does not match the descriptor.

§

PermissionDenied

A published operation is not permitted for the caller.

§

ResourceLimitExceeded

A bounded protocol resource limit was exceeded.

For call_operation, the Host guarantees that the operation was not run or that all of its effects were rolled back.

§

Internal

The Host encountered an internal failure.

For call_operation, the Host guarantees that the operation was not run or that all of its effects were rolled back.

§

OperationOutcomeUnknown

The Host cannot guarantee that the operation was not run or rolled back.

A Client must not automatically retry because the operation may have committed effects even though no success response was available.

Implementations§

Source§

impl ProtocolErrorCode

Source

pub const ALL: [Self; 14]

Every canonical wire-level error code.

Source

pub const fn is_allowed_for(self, interaction: ProtocolInteraction) -> bool

Whether a Host may return this code for interaction.

false identifies an invalid error response; it does not turn that response into another wire-level protocol failure.

Trait Implementations§

Source§

impl Clone for ProtocolErrorCode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for ProtocolErrorCode

Source§

impl Debug for ProtocolErrorCode

Source§

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

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

impl Eq for ProtocolErrorCode

Source§

impl PartialEq for ProtocolErrorCode

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ProtocolErrorCode

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.