Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 18 variants InvalidConfig { attribute: String, reason: String, }, MalformedConfig(String), Attestation(Error), MalformedAssignment, ReassignRequired, Channel(ChannelError), MalformedRequest, ReleaseUnavailable, TooManyResponseSlots, ReleaseNotAttested, MalformedResult, InvalidSigningKey, StatementInvalid, WebSocket(Error), Timeout, ConnectionClosed, MalformedMessage, ApiFrame { code: String, allow_retry: bool, },
}
Expand description

Failures while configuring or calling the host.

Variants§

§

InvalidConfig

A configuration field was not usable.

Fields

§attribute: String

Which field.

§reason: String

Why it was rejected.

§

MalformedConfig(String)

The configuration JSON could not be parsed.

§

Attestation(Error)

An attestation document did not verify.

§

MalformedAssignment

The assignment document or public key was not valid base64.

§

ReassignRequired

The assignment is stale: re-assign, re-seal, and retry once.

§

Channel(ChannelError)

Channel attestation, key binding, sealing or opening failed.

§

MalformedRequest

The request violated a WIP-201 bound or its AAT did not verify.

§

ReleaseUnavailable

The attested release does not define the request’s pipeline or match_strictness, or the request’s pipeline_inputs do not fit the pipeline.

§

TooManyResponseSlots

The request’s pipeline lists more response slots than the configured maximum, so its response timing could reveal too much (WIP-201 §4.6 step 3).

§

ReleaseNotAttested

The assignment’s attestation does not carry the release_hash of its release manifest.

§

MalformedResult

The sealed plaintext was not a match result.

§

InvalidSigningKey

The attested signing public key was not a valid BabyJubJub point.

§

StatementInvalid

The statement did not verify under the attested signing key.

§

WebSocket(Error)

The WebSocket handshake or an I/O operation on it failed.

§

Timeout

An operation did not finish within its configured deadline.

§

ConnectionClosed

The host closed the WebSocket before the exchange completed.

§

MalformedMessage

A frame was not the message the protocol expects at that point.

§

ApiFrame

The host returned an error envelope over the WebSocket.

Fields

§code: String

Machine-readable code from the envelope.

§allow_retry: bool

Whether the host says the request may be retried.

Trait Implementations§

Source§

impl Debug for Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

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

Replaced by Error::source.
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<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Forget for Error

§

impl Freeze for Error

§

impl Move for Error

§

impl Send for Error
where RawVecInner: Send, Repr: Send, BoxRaw<Error>: Send, BoxRaw<HeaderName>: Send, BoxRaw<Message>: Send, BoxRaw<Response<Option<Vec<u8>>>>: Send,

§

impl Sync for Error
where RawVecInner: Sync, Repr: Sync, BoxRaw<Error>: Sync, BoxRaw<HeaderName>: Sync, BoxRaw<Message>: Sync, BoxRaw<Response<Option<Vec<u8>>>>: Sync,

§

impl Unpin for Error
where *const u8 is !null: Unpin, *const () is !null: Unpin, &'static SimpleMessage: Unpin, *const Custom is !null: Unpin, Box<Error>: Unpin, Box<HeaderName>: Unpin, Box<Message>: Unpin, Box<Response<Option<Vec<u8>>>>: Unpin,

§

impl UnsafeUnpin for Error

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V