pub struct BlobManifest {
pub cid: String,
pub merkle: String,
pub xorb_hashes: Vec<String>,
pub bytes_stored: u64,
pub byte_len: u64,
pub security_label: SecurityLabel,
}Expand description
The L1 manifest describing one stored blob.
This is the sealed substrate-level result type. It supersedes
cas_serve::PutResult for substrate callers by adding the canonical
Self::cid and required Self::security_label, while keeping
Self::merkle and Self::xorb_hashes so existing wire/provenance
behavior is preserved.
Fields§
§cid: StringCanonical self-describing content address (CIDv1, base32 multibase). Encodes the reconstruction codec + multihash algorithm + digest, so it is portable across the local registry, federation, and XET CAS uniformly.
merkle: StringLegacy XET merkle root (hex). Identical to cas_serve::PutResult::merkle.
Retained because the current putBlob/getBlob wire and the provenance
store key on it.
xorb_hashes: Vec<String>Reconstruction xorb set (hex xorb hashes), from the underlying store.
bytes_stored: u64Bytes newly written after content-addressed dedup within the domain
(0 if fully deduplicated).
byte_len: u64Total byte length of the reconstructed content.
security_label: SecurityLabelTrusted content-bound label (#1270). The MAC object label for this
sealed blob, derived from the
DedupDomain at seal time.
The substrate derives this via crate::mac::cas_pep::seal_label as a
restrict-only join of the domain’s structural label and any trusted
staging hint. It is required and covered by the manifest CID, so
relabeling necessarily creates a distinct object.
Implementations§
Source§impl BlobManifest
impl BlobManifest
Sourcepub fn new(
merkle: String,
xorb_hashes: Vec<String>,
bytes_stored: u64,
byte_len: u64,
security_label: SecurityLabel,
) -> Result<Self, CasError>
pub fn new( merkle: String, xorb_hashes: Vec<String>, bytes_stored: u64, byte_len: u64, security_label: SecurityLabel, ) -> Result<Self, CasError>
Construct a sealed, labeled manifest and derive its content-bound CID.
Sourcepub fn recomputed_cid(&self) -> Result<String, CasError>
pub fn recomputed_cid(&self) -> Result<String, CasError>
Recompute the CID from the complete manifest preimage.
Trait Implementations§
Source§impl Clone for BlobManifest
impl Clone for BlobManifest
Source§fn clone(&self) -> BlobManifest
fn clone(&self) -> BlobManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ContentBoundLabel for BlobManifest
impl ContentBoundLabel for BlobManifest
Source§fn content_id(&self) -> &[u8] ⓘ
fn content_id(&self) -> &[u8] ⓘ
LabeledObject::security_label MUST be part of the preimage of this
CID.Source§fn verify_binding(&self) -> bool
fn verify_binding(&self) -> bool
content_id. A real impl uses this to verify the binding
when a manifest is loaded from the store — a mismatch ⇒ tampered ⇒ deny. Read moreSource§impl Debug for BlobManifest
impl Debug for BlobManifest
Source§impl<'de> Deserialize<'de> for BlobManifest
impl<'de> Deserialize<'de> for BlobManifest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl LabeledObject for BlobManifest
impl LabeledObject for BlobManifest
Source§fn security_label(&self) -> Option<SecurityLabel>
fn security_label(&self) -> Option<SecurityLabel>
None ⇒ unlabeled ⇒ the monitor MUST
deny (no unlabeled-default-allow; design §1 invariant 2). Implementors
must NOT manufacture a permissive default here.Source§impl PartialEq for BlobManifest
impl PartialEq for BlobManifest
Source§fn eq(&self, other: &BlobManifest) -> bool
fn eq(&self, other: &BlobManifest) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for BlobManifest
impl Serialize for BlobManifest
impl Eq for BlobManifest
impl StructuralPartialEq for BlobManifest
Auto Trait Implementations§
impl Freeze for BlobManifest
impl RefUnwindSafe for BlobManifest
impl Send for BlobManifest
impl Sync for BlobManifest
impl Unpin for BlobManifest
impl UnsafeUnpin for BlobManifest
impl UnwindSafe for BlobManifest
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request