pub enum ProvenanceError {
InvalidNodeId,
InvalidRelationKind,
KindTypeMismatch {
kind: ProvRelationKind,
node_type: ProvNodeType,
},
SelfLoop {
node_id: u64,
},
ChainTooDeep {
depth: usize,
},
CycleDetected {
at_node: u64,
},
OverflowNotSet {
excess: usize,
},
}Expand description
Errors raised when constructing or validating provenance headers.
Variants§
InvalidNodeId
node_id == 0 - reserved for “unset”.
InvalidRelationKind
A relation’s kind was set to None, which marks empty slots.
KindTypeMismatch
The source node_type does not match the relation’s expected type.
Fields
§
kind: ProvRelationKindThe offending relation kind.
§
node_type: ProvNodeTypeThe declared node type.
SelfLoop
A relation pointed back at the node itself (direct cycle).
ChainTooDeep
A chain traversal exceeded MAX_CHAIN_DEPTH.
CycleDetected
A cycle was detected while traversing a chain.
OverflowNotSet
More than 4 relations were added without setting overflow_ref.
Trait Implementations§
Source§impl Clone for ProvenanceError
impl Clone for ProvenanceError
Source§fn clone(&self) -> ProvenanceError
fn clone(&self) -> ProvenanceError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProvenanceError
impl Debug for ProvenanceError
Source§impl Display for ProvenanceError
impl Display for ProvenanceError
Source§impl Error for ProvenanceError
impl Error for ProvenanceError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ProvenanceError
impl PartialEq for ProvenanceError
impl Copy for ProvenanceError
impl Eq for ProvenanceError
impl StructuralPartialEq for ProvenanceError
Auto Trait Implementations§
impl Freeze for ProvenanceError
impl RefUnwindSafe for ProvenanceError
impl Send for ProvenanceError
impl Sync for ProvenanceError
impl Unpin for ProvenanceError
impl UnsafeUnpin for ProvenanceError
impl UnwindSafe for ProvenanceError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.