Skip to main content

ManifestLabelSource

Trait ManifestLabelSource 

Source
pub trait ManifestLabelSource: Send + Sync {
    // Required method
    fn label_for(&self, cid: &[u8]) -> Option<Option<SecurityLabel>>;
}
Expand description

Resolves a content-addressed object (a CAS [BlobManifest]) to its carried label. The seam between the composite resolver and the CAS manifest store.

The outer Option is “does a manifest exist for this CID?” and the inner is the manifest’s security_label carrier field:

  • Some(Some(label)) — manifest present and labeled ⇒ use the label.
  • Some(None) — manifest present but unlabeled ⇒ deny.
  • None — no manifest for this CID ⇒ unresolvable ⇒ deny.

Required Methods§

Source

fn label_for(&self, cid: &[u8]) -> Option<Option<SecurityLabel>>

The label carried by the manifest for cid, per the semantics above.

Implementors§