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
impl ProtocolErrorCode
Sourcepub const fn is_allowed_for(self, interaction: ProtocolInteraction) -> bool
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.