pub struct Q42AssetEnvelope {Show 19 fields
pub asset_id: String,
pub upstream: UpstreamRelease,
pub licence: LicencePolicy,
pub toolchain: ToolchainVersions,
pub raw_format: String,
pub media_type: String,
pub counts: RecordCounts,
pub rejection_reasons: Vec<String>,
pub identifier_namespaces: Vec<String>,
pub cross_reference_policy: String,
pub evidence_grade: String,
pub citation: String,
pub curation_status: String,
pub sensitivity: AssetSensitivity,
pub routing_lane: AssetRoutingLane,
pub derived_from: Vec<String>,
pub shacl_profile: String,
pub validation_report: String,
pub chunk_plan: Vec<ChunkSpec>,
}Expand description
Versioned core schema for a governed Q42 dataset asset.
Fields§
§asset_id: String§upstream: UpstreamRelease§licence: LicencePolicy§toolchain: ToolchainVersions§raw_format: String§media_type: String§counts: RecordCounts§rejection_reasons: Vec<String>§identifier_namespaces: Vec<String>§cross_reference_policy: String§evidence_grade: String§citation: String§curation_status: String§sensitivity: AssetSensitivity§routing_lane: AssetRoutingLane§derived_from: Vec<String>§shacl_profile: String§validation_report: String§chunk_plan: Vec<ChunkSpec>Implementations§
Source§impl Q42AssetEnvelope
impl Q42AssetEnvelope
Sourcepub fn encode(&self) -> Result<Vec<u8>, AssetEnvelopeError>
pub fn encode(&self) -> Result<Vec<u8>, AssetEnvelopeError>
Deterministic little-endian encode. Fails if validation or size budget fails.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, AssetEnvelopeError>
pub fn decode(bytes: &[u8]) -> Result<Self, AssetEnvelopeError>
Decode and re-validate.
Sourcepub fn envelope_digest(&self) -> Result<[u8; 32], AssetEnvelopeError>
pub fn envelope_digest(&self) -> Result<[u8; 32], AssetEnvelopeError>
Deterministic digest of the encoded envelope bytes (not the payload).
Source§impl Q42AssetEnvelope
impl Q42AssetEnvelope
Sourcepub fn validate(&self) -> Result<(), AssetEnvelopeError>
pub fn validate(&self) -> Result<(), AssetEnvelopeError>
Fail closed on unknown licence, empty identity, inconsistent counts, or oversize chunks.
Sourcepub fn derive_with(
&self,
asset_id: impl Into<String>,
other_licence: &LicencePolicy,
toolchain: ToolchainVersions,
chunk_plan: Vec<ChunkSpec>,
) -> Result<Self, AssetEnvelopeError>
pub fn derive_with( &self, asset_id: impl Into<String>, other_licence: &LicencePolicy, toolchain: ToolchainVersions, chunk_plan: Vec<ChunkSpec>, ) -> Result<Self, AssetEnvelopeError>
Build a derived envelope that inherits the union of licence obligations.
Sourcepub fn verify_payload_digest(
&self,
digest: &[u8; 32],
) -> Result<(), AssetEnvelopeError>
pub fn verify_payload_digest( &self, digest: &[u8; 32], ) -> Result<(), AssetEnvelopeError>
Verify a payload digest against the upstream SHA-256 recorded on the envelope.
Trait Implementations§
Source§impl Clone for Q42AssetEnvelope
impl Clone for Q42AssetEnvelope
Source§impl Debug for Q42AssetEnvelope
impl Debug for Q42AssetEnvelope
impl Eq for Q42AssetEnvelope
Source§impl PartialEq for Q42AssetEnvelope
impl PartialEq for Q42AssetEnvelope
impl StructuralPartialEq for Q42AssetEnvelope
Auto Trait Implementations§
impl Freeze for Q42AssetEnvelope
impl RefUnwindSafe for Q42AssetEnvelope
impl Send for Q42AssetEnvelope
impl Sync for Q42AssetEnvelope
impl Unpin for Q42AssetEnvelope
impl UnsafeUnpin for Q42AssetEnvelope
impl UnwindSafe for Q42AssetEnvelope
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>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
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
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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