pub enum ProvenanceSectionError {
PayloadTooShort {
got: usize,
need: usize,
},
BadMagic {
got: u32,
},
UnsupportedVersion {
got: u16,
},
NonZeroReserved,
UnknownFlags {
got: u16,
},
FieldTooLarge {
field: &'static str,
got: usize,
max: usize,
},
PayloadTruncated {
expected: usize,
got: usize,
},
OutputBufferTooSmall {
needed: usize,
have: usize,
},
VcFlagInconsistent {
has_vc: bool,
vc_len: u32,
},
NonUtf8 {
field: &'static str,
},
SourceDigestMismatch {
expected: u32,
got: u32,
},
MissingLicence,
}Expand description
Provenance-section read/write/validate error.
Variants§
PayloadTooShort
The payload is too short for the mini-header.
BadMagic
The payload magic is not PROVENANCE_MAGIC.
UnsupportedVersion
The payload version is not PROVENANCE_SECTION_VERSION.
NonZeroReserved
The mini-header reserved_u32 is non-zero.
UnknownFlags
Unknown flags bit set (only bit 0 is defined in v1).
FieldTooLarge
A variable-length field exceeds MAX_PROVENANCE_FIELD.
PayloadTruncated
The payload is too short for the declared field lengths.
OutputBufferTooSmall
The output buffer is too small.
VcFlagInconsistent
The FLAG_HAS_VC bit and vc_len disagree.
NonUtf8
A field declared as utf8 (media type / licence) is not valid utf8.
SourceDigestMismatch
Validate gate: the carried source bytes do not hash to the declared
source_digest — the sidecar’s source is not authentic to its claim.
MissingLicence
Validate gate: no licence is present (context was stripped).
Trait Implementations§
Source§impl Clone for ProvenanceSectionError
impl Clone for ProvenanceSectionError
Source§fn clone(&self) -> ProvenanceSectionError
fn clone(&self) -> ProvenanceSectionError
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 ProvenanceSectionError
impl Debug for ProvenanceSectionError
Source§impl Display for ProvenanceSectionError
impl Display for ProvenanceSectionError
Source§impl Error for ProvenanceSectionError
impl Error for ProvenanceSectionError
1.30.0 · 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 PartialEq for ProvenanceSectionError
impl PartialEq for ProvenanceSectionError
Source§fn eq(&self, other: &ProvenanceSectionError) -> bool
fn eq(&self, other: &ProvenanceSectionError) -> bool
self and other values to be equal, and is used by ==.impl Eq for ProvenanceSectionError
impl StructuralPartialEq for ProvenanceSectionError
Auto Trait Implementations§
impl Freeze for ProvenanceSectionError
impl RefUnwindSafe for ProvenanceSectionError
impl Send for ProvenanceSectionError
impl Sync for ProvenanceSectionError
impl Unpin for ProvenanceSectionError
impl UnsafeUnpin for ProvenanceSectionError
impl UnwindSafe for ProvenanceSectionError
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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