Enum DoorError
pub enum DoorError {
Unknown(ActionAddress),
MissingArgument(ActionAddress),
UnexpectedArgument(ActionAddress),
InvalidArguments(String),
Unavailable {
code: String,
reason: String,
},
ConfirmationRequired,
UnregisteredType(String),
Failed(String),
}Expand description
Why an address could not be performed. Unknown deliberately covers
both “no such address” and “not offered to you”, so a caller can’t
map what it may not reach by probing for a different error.
Variants§
Unknown(ActionAddress)
Nothing in the tree carries this address.
MissingArgument(ActionAddress)
The action takes text and none was supplied.
UnexpectedArgument(ActionAddress)
The action takes nothing and an argument was supplied. Refused, not dropped — a silently ignored argument leaves the caller believing it asked for something it didn’t get.
InvalidArguments(String)
Typed arguments failed the action’s declared schema.
The address exists and is intentionally advertised, but its current precondition is not satisfied.
ConfirmationRequired
The action contract requires an explicit confirmation step that this invocation did not carry.
UnregisteredType(String)
The app never registered a decoder for the action’s type, so the door can’t prove what it would run. Fail-closed: a refusal, not a best-effort apply.
Failed(String)
The action ran and failed.
Implementations§
§impl DoorError
impl DoorError
pub fn decoding(error: ActionError) -> DoorError
pub fn decoding(error: ActionError) -> DoorError
Why an encoded action could not be turned back into one: no decoder for its type, or a payload the registered decoder does not read (the code that encoded it and the code decoding it disagree). The second is a fault of its own and says so; reporting it as an unknown type sends whoever reads it looking for a registration that is there.
Trait Implementations§
§impl Error for DoorError
impl Error for DoorError
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()
impl Eq for DoorError
impl StructuralPartialEq for DoorError
Auto Trait Implementations§
impl Freeze for DoorError
impl RefUnwindSafe for DoorError
impl Send for DoorError
impl Sync for DoorError
impl Unpin for DoorError
impl UnsafeUnpin for DoorError
impl UnwindSafe for DoorError
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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