pub enum ResourceLedgerError {
Orphan {
key: ResourceKey,
context: Option<ResourceCommandContext>,
},
DuplicateClose {
key: ResourceKey,
context: ResourceCommandContext,
},
ForbiddenOpen {
key: ResourceKey,
context: Option<ResourceCommandContext>,
},
StillOpen {
key: ResourceKey,
context: Option<ResourceCommandContext>,
},
ClosedScopeOwnsResources {
scope: ScopeId,
resources: Vec<ResourceKey>,
contexts: Vec<ResourceCommandContext>,
},
CountMismatch {
key: ResourceKey,
field: &'static str,
expected: usize,
actual: usize,
context: Option<ResourceCommandContext>,
},
GenerationMismatch {
key: ResourceKey,
expected: u64,
actual: u64,
context: Option<ResourceCommandContext>,
},
OwnerMismatch {
key: ResourceKey,
expected: BTreeSet<ScopeId>,
actual: BTreeSet<ScopeId>,
context: Option<ResourceCommandContext>,
},
CommandOrderMismatch {
expected: Vec<ResourceCommandTrace>,
actual: Vec<ResourceCommandTrace>,
},
MissingStatus {
key: ResourceKey,
command_revision: Revision,
},
StatusClassMismatch {
context: ResourceStatusContext,
expected: HostStatusClass,
},
StatusMutatedClosedScope {
scope: ScopeId,
context: ResourceStatusContext,
},
}Expand description
Resource ledger assertion failure.
Variants§
Orphan
Resource has no owner.
Fields
key: ResourceKeyResource key.
context: Option<ResourceCommandContext>Last known command context for the resource.
DuplicateClose
Resource was closed without a matching owner.
Fields
key: ResourceKeyResource key.
context: ResourceCommandContextCommand context that attempted the duplicate close.
ForbiddenOpen
Forbidden resource demand was opened.
Fields
key: ResourceKeyResource key.
context: Option<ResourceCommandContext>Command context that opened the forbidden resource.
StillOpen
Resource is still open.
Fields
key: ResourceKeyResource key.
context: Option<ResourceCommandContext>Last known command context for the resource.
ClosedScopeOwnsResources
A closed scope still owns resources.
Fields
resources: Vec<ResourceKey>Resources still owned by the closed scope.
contexts: Vec<ResourceCommandContext>Last command contexts for the resources.
CountMismatch
Resource command count differed from expectation.
Fields
key: ResourceKeyResource key.
context: Option<ResourceCommandContext>Last known command context for the resource.
GenerationMismatch
Resource generation differed from expectation.
Fields
key: ResourceKeyResource key.
context: Option<ResourceCommandContext>Last known command context for the resource.
OwnerMismatch
Resource does not have the expected owners.
Fields
key: ResourceKeyResource key.
context: Option<ResourceCommandContext>Last known command context for the resource.
CommandOrderMismatch
Resource command order did not match the expected structural trace.
Fields
expected: Vec<ResourceCommandTrace>Expected command trace.
actual: Vec<ResourceCommandTrace>Actual command trace.
MissingStatus
No matching status classification was recorded.
Fields
key: ResourceKeyResource key.
StatusClassMismatch
A status was classified differently than expected.
Fields
context: ResourceStatusContextRecorded status context.
expected: HostStatusClassExpected classification.
StatusMutatedClosedScope
A host status appeared to mutate ownership for a closed scope.
Fields
context: ResourceStatusContextStatus context that caused the failure.
Trait Implementations§
Source§impl Clone for ResourceLedgerError
impl Clone for ResourceLedgerError
Source§fn clone(&self) -> ResourceLedgerError
fn clone(&self) -> ResourceLedgerError
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 ResourceLedgerError
impl Debug for ResourceLedgerError
impl Eq for ResourceLedgerError
Source§impl PartialEq for ResourceLedgerError
impl PartialEq for ResourceLedgerError
Source§fn eq(&self, other: &ResourceLedgerError) -> bool
fn eq(&self, other: &ResourceLedgerError) -> bool
self and other values to be equal, and is used by ==.