pub enum DelegationError {
Peering(PeeringError),
SelfDelegation,
Malformed(String),
UnsupportedFormat {
found: u16,
},
WrongDelegate {
addressed: Uuid,
},
ProtocolUnsupported {
bundle: String,
ours: String,
},
Tampered(String),
Inbox(String),
Upload(UploadError),
UnknownDelegation(Uuid),
AckMismatch,
WrongOrigin {
origin: Uuid,
peer: Uuid,
},
}Expand description
Why a hand-off could not be sealed, accepted, uploaded or settled.
Variants§
Peering(PeeringError)
The device directory or a device in it was refused (unknown, revoked, rolled back, foreign).
SelfDelegation
The origin named itself as the delegate.
Malformed(String)
The bytes are not a hand-off this build reads.
UnsupportedFormat
The hand-off is in a container format newer than this build reads.
WrongDelegate
The hand-off was sealed for another delegate.
Fields
addressed: UuidThe delegate the origin named.
ProtocolUnsupported
The bundle’s protocol version is newer than this delegate speaks. The delegate refuses the hand-off and the origin keeps the upload.
Fields
Tampered(String)
A member of the bundle does not match what the signed manifest commits to, or its bytes do not hash to what its request declares. Carries what failed.
Inbox(String)
Persisting, reading or removing the delegate’s copy failed.
Upload(UploadError)
The upload itself failed.
UnknownDelegation(Uuid)
The origin ledger knows no delegation for the asset.
AckMismatch
An acknowledgement names another hand-off or another delegate than the one recorded.
WrongOrigin
A hand-off pulled over the peering channel was sealed by another device than the peer the handshake verified: a peer serves only its own hand-offs.
Implementations§
Source§impl DelegationError
impl DelegationError
Sourcepub fn kind(&self) -> &'static str
pub fn kind(&self) -> &'static str
The stable name a --json report and a channel refusal carry this error under. A refused
device or directory is named by its PeeringError::kind; every other variant has its
own name, never renamed.
Sourcepub fn error_code(&self) -> Option<&str>
pub fn error_code(&self) -> Option<&str>
The stable error.* code the server supplied, when there was one.
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Whether a hand-off the delegate holds, failing with this error, can never succeed, so
dispose_failure quarantines the delegate’s copy rather than retrying it.
Permanent: the origin is no longer an unrevoked device of the pinned directory (revoked
or removed after the hand-off was accepted); the held bytes no longer verify (malformed,
addressed to another device, tampered with); or the server refused the requests with one
of PERMANENT_UPLOAD_REFUSALS. Everything else is transient and keeps the copy for
the next run: this device’s directory or trust state, a container or protocol newer
than this build (an update reads it), the inbox, the network, an outage, quota, rate
limits, and any other refusal.
Trait Implementations§
Source§impl Debug for DelegationError
impl Debug for DelegationError
Source§impl Display for DelegationError
impl Display for DelegationError
Source§impl Error for DelegationError
impl Error for DelegationError
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()
Source§impl From<PeeringError> for DelegationError
impl From<PeeringError> for DelegationError
Source§fn from(source: PeeringError) -> Self
fn from(source: PeeringError) -> Self
Source§impl From<UploadError> for DelegationError
impl From<UploadError> for DelegationError
Source§fn from(source: UploadError) -> Self
fn from(source: UploadError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for DelegationError
impl !UnwindSafe for DelegationError
impl Freeze for DelegationError
impl Send for DelegationError
impl Sync for DelegationError
impl Unpin for DelegationError
impl UnsafeUnpin for DelegationError
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§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