pub enum EncodeError {
Show 19 variants
UnknownTypeId(TypeId),
DuplicateTypeId(TypeId),
QuotaTokenNotTransportable,
SecretNotTransportable,
PermissionCardNotTransportable,
QuotaResolver(String),
SecretResolver(String),
PermissionCardResolver(String),
QuotaTokenAlreadyConsumed,
SecretAlreadyConsumed,
PermissionCardAlreadyConsumed,
AliasedQuotaTokenHandle,
AliasedSecretHandle,
StreamNotTransportable,
StreamAlreadyConsumed,
AliasedStream,
StreamRequiresAsyncEncoding,
StreamResolver(String),
AliasedPermissionCardHandle,
}Expand description
Errors that can occur while encoding a recursive schema graph / value into the flat wire form.
Variants§
UnknownTypeId(TypeId)
A SchemaType::Ref referenced a TypeId that is not defined in the
enclosing graph.
DuplicateTypeId(TypeId)
Two definitions share the same TypeId.
QuotaTokenNotTransportable
A SchemaValue::QuotaToken snapshot was encountered while encoding a
value tree through the pure (resolver-less) path. Quota tokens cross the
WASM boundary only as owned handles, which requires the host-side
[encode_value_with] entry point and a QuotaTokenResolver.
SecretNotTransportable
A SchemaValue::Secret snapshot was encountered while encoding a
value tree through the pure (resolver-less) path. Secrets cross the
WASM boundary only as owned handles.
PermissionCardNotTransportable
A SchemaValue::PermissionCard snapshot was encountered while encoding
a value tree through the pure (resolver-less) path. Permission cards
cross the WASM boundary only as owned handles, which requires the
host-side [encode_value_with] entry point and a
PermissionCardResolver.
QuotaResolver(String)
The host QuotaTokenResolver failed to materialize an owned handle from
a snapshot.
SecretResolver(String)
The host SecretResolver failed to materialize an owned handle from a
snapshot.
PermissionCardResolver(String)
The host PermissionCardResolver failed to materialize an owned handle
from a snapshot.
QuotaTokenAlreadyConsumed
(Guest) A quota-token value was encoded after its owned handle had
already been transferred out by an earlier encode. An owned
quota-token can only be lowered once.
SecretAlreadyConsumed
(Guest) A secret value was encoded after its owned handle had already been transferred out by an earlier encode.
PermissionCardAlreadyConsumed
(Guest) A permission-card value was encoded after its owned handle had already been transferred out by an earlier encode.
AliasedQuotaTokenHandle
(Guest) The same owned quota-token handle appeared more than once in a
single value tree. An owned quota-token cannot be lowered twice; split
the token first if two independent capabilities are required.
AliasedSecretHandle
(Guest) The same owned secret handle appeared more than once in a single value tree.
StreamNotTransportable
A live stream was used at a materializing boundary rather than a stream-aware invocation boundary.
StreamAlreadyConsumed
A stream endpoint was already transferred by an earlier encode.
AliasedStream
The same affine stream leaf appeared more than once in one value tree.
StreamRequiresAsyncEncoding
A guest-native reader must first be wrapped asynchronously.
StreamResolver(String)
The host failed to transfer a native reader into a schema-value-stream resource.
AliasedPermissionCardHandle
(Guest) The same owned permission-card handle appeared more than once in
a single value tree. An owned permission-card cannot be lowered twice.
Trait Implementations§
Source§impl Clone for EncodeError
impl Clone for EncodeError
Source§fn clone(&self) -> EncodeError
fn clone(&self) -> EncodeError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EncodeError
impl Debug for EncodeError
Source§impl Display for EncodeError
impl Display for EncodeError
impl Eq for EncodeError
Source§impl Error for EncodeError
impl Error for EncodeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()