pub enum OwnershipError {
SessionNotFound {
session_id: SessionId,
},
AlreadyClaimed {
session_id: SessionId,
current_owner_id: FragmentOwnerId,
},
Unclaimed {
session_id: SessionId,
},
StaleCapability {
session_id: SessionId,
owner_id: FragmentOwnerId,
expected_generation: OwnershipEpoch,
actual_generation: OwnershipEpoch,
},
ScopeViolation {
session_id: SessionId,
owner_id: FragmentOwnerId,
required: OwnershipScope,
actual: OwnershipScope,
},
TransferPending {
session_id: SessionId,
claim_id: OwnershipClaimId,
},
TransferNotPending {
session_id: SessionId,
},
ReceiptMismatch {
session_id: SessionId,
claim_id: OwnershipClaimId,
},
InvalidWitness {
session_id: SessionId,
witness_id: AuthorityWitnessId,
reason: String,
},
WitnessConsumed {
session_id: SessionId,
witness_id: AuthorityWitnessId,
},
Terminal {
session_id: SessionId,
reason: OwnershipTerminalReason,
},
}Expand description
Errors surfaced by the runtime ownership contract.
Variants§
SessionNotFound
Session was not found.
AlreadyClaimed
Session already has a current owner.
Fields
current_owner_id: FragmentOwnerIdOwner that already holds the claim.
Unclaimed
Session does not currently have an owner.
StaleCapability
Capability generation or owner no longer matches live state.
Fields
owner_id: FragmentOwnerIdOwner label carried by the stale capability.
expected_generation: OwnershipEpochGeneration expected by the caller.
actual_generation: OwnershipEpochGeneration currently live in the session store.
ScopeViolation
Capability scope is too weak for the attempted operation.
Fields
owner_id: FragmentOwnerIdOwner label that attempted the operation.
required: OwnershipScopeMinimum scope required for the operation.
actual: OwnershipScopeActual live scope carried by the capability.
TransferPending
Another staged ownership transfer already exists.
Fields
claim_id: OwnershipClaimIdIdentifier of the staged transfer.
TransferNotPending
No staged ownership transfer exists.
ReceiptMismatch
Transfer receipt does not match live staged state.
Fields
claim_id: OwnershipClaimIdIdentifier carried by the mismatched receipt.
InvalidWitness
Witness does not match current live authority state.
Fields
witness_id: AuthorityWitnessIdWitness that failed validation.
WitnessConsumed
Witness was already consumed.
Fields
witness_id: AuthorityWitnessIdWitness id that cannot be reused.
Terminal
Ownership already terminated for this session.
Fields
reason: OwnershipTerminalReasonRecorded terminal ownership reason.
Trait Implementations§
Source§impl Clone for OwnershipError
impl Clone for OwnershipError
Source§fn clone(&self) -> OwnershipError
fn clone(&self) -> OwnershipError
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 OwnershipError
impl Debug for OwnershipError
Source§impl<'de> Deserialize<'de> for OwnershipError
impl<'de> Deserialize<'de> for OwnershipError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for OwnershipError
Source§impl PartialEq for OwnershipError
impl PartialEq for OwnershipError
Source§fn eq(&self, other: &OwnershipError) -> bool
fn eq(&self, other: &OwnershipError) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for OwnershipError
impl Serialize for OwnershipError
impl StructuralPartialEq for OwnershipError
Auto Trait Implementations§
impl Freeze for OwnershipError
impl RefUnwindSafe for OwnershipError
impl Send for OwnershipError
impl Sync for OwnershipError
impl Unpin for OwnershipError
impl UnsafeUnpin for OwnershipError
impl UnwindSafe for OwnershipError
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.