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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more