pub enum DecodeError {
Show 23 variants
TypeNodeIndexOutOfRange(i32),
ValueNodeIndexOutOfRange(i32),
DefIndexOutOfRange(i32),
DuplicateTypeId(TypeId),
InvalidDatetime {
seconds: i64,
nanoseconds: u32,
},
CyclicTypeWithoutRef,
QuotaTokenRequiresResolver,
SecretRequiresResolver,
AliasedValueNode(i32),
UnconsumedQuotaTokenHandle(i32),
UnconsumedSecretHandle(i32),
UnconsumedStream(i32),
QuotaResolver(String),
SecretResolver(String),
QuotaTokenNotPermitted(i32),
SecretNotPermitted(i32),
StreamRequiresStore(i32),
StreamNotPermitted(i32),
StreamResolver(String),
PermissionCardRequiresResolver,
UnconsumedPermissionCardHandle(i32),
PermissionCardResolver(String),
PermissionCardNotPermitted(i32),
}Expand description
Errors that can occur while decoding the flat wire form into the recursive in-memory representation.
Variants§
TypeNodeIndexOutOfRange(i32)
ValueNodeIndexOutOfRange(i32)
DefIndexOutOfRange(i32)
DuplicateTypeId(TypeId)
InvalidDatetime
CyclicTypeWithoutRef
Cycle detected in the flat type-node list that does not pass through a
ref-type (which is the only valid recursion form).
QuotaTokenRequiresResolver
A quota-token-handle node was encountered while decoding through the
pure (resolver-less) path. Owned quota-token handles can only be lifted
on the host via [decode_value_with] and a QuotaTokenResolver.
SecretRequiresResolver
A secret-value node was encountered while decoding through the pure
path. Owned secret handles can only be lifted once the secret resolver
path is added.
AliasedValueNode(i32)
A value node was referenced more than once (or formed a cycle) while decoding an owned value tree. Owned handles are affine, so the tree must be a strict tree; aliasing would consume a handle twice.
UnconsumedQuotaTokenHandle(i32)
An owned quota-token handle was present in the value tree but never
reached from the root. The handle is dropped (so it does not leak) and
the tree is rejected as malformed, since every transferred owned resource
must be referenced exactly once.
UnconsumedSecretHandle(i32)
An owned secret handle was present in the value tree but never reached
from the root.
UnconsumedStream(i32)
An owned stream wrapper was present but never reached from the root.
QuotaResolver(String)
The host QuotaTokenResolver failed to snapshot an owned handle.
SecretResolver(String)
The host SecretResolver failed to snapshot an owned handle.
QuotaTokenNotPermitted(i32)
An owned quota-token handle was present in a value tree at a boundary
that does not permit quota tokens (e.g. agent config, durable-function
request/response, agent-error payloads, inbound oplog entries). The
handle is dropped from the resource table before this error is returned,
so nothing leaks.
SecretNotPermitted(i32)
An owned secret handle was present in a value tree at a boundary that
does not permit secret transport. The handle is dropped from the resource
table before this error is returned, so nothing leaks.
StreamRequiresStore(i32)
A stream wrapper was encountered at a non-stream-aware host boundary.
StreamNotPermitted(i32)
A live stream was encountered at a materializing boundary.
StreamResolver(String)
The host failed to transfer a schema-value-stream resource into a native reader.
PermissionCardRequiresResolver
A permission-card-handle node was encountered while decoding through
the pure (resolver-less) path. Owned permission-card handles can only be
lifted on the host via [decode_value_with] and a
PermissionCardResolver.
UnconsumedPermissionCardHandle(i32)
An owned permission-card handle was present in the value tree but
never reached from the root.
PermissionCardResolver(String)
The host PermissionCardResolver failed to snapshot an owned handle.
PermissionCardNotPermitted(i32)
An owned permission-card handle was present in a value tree at a
boundary that does not permit permission-card transport. The handle is
dropped from the resource table before this error is returned, so
nothing leaks.
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§fn clone(&self) -> DecodeError
fn clone(&self) -> DecodeError
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 DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
impl Eq for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
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()