pub struct MintSpec { /* private fields */ }Expand description
Everything a mint needs, gathered with a builder. The one-call form is
MintSpec::new(target, sharer, channel) — variants, meta, lineage, and
ttl are escalations, never prerequisites (doc 17 §1 rule 3).
Implementations§
Source§impl MintSpec
impl MintSpec
Sourcepub fn new(target: CanonicalUrl, sharer: Sharer, channel: Channel) -> Self
pub fn new(target: CanonicalUrl, sharer: Sharer, channel: Channel) -> Self
The minimum viable mint: an artifact, a sharer, a channel.
Sourcepub fn meta(self, meta: TargetMeta) -> Self
pub fn meta(self, meta: TargetMeta) -> Self
Attach the mint-time snapshot (title, description, image, labels).
Sourcepub fn variant(self, match_expr: MatchExpr, body: VariantBody) -> Self
pub fn variant(self, match_expr: MatchExpr, body: VariantBody) -> Self
Add a variant. Declaration order is selection tie-break order.
Sourcepub fn child_of(self, parent: Token) -> Self
pub fn child_of(self, parent: Token) -> Self
Mark this token as a delegation child of parent (lineage).
Sourcepub fn target_str(&self) -> &str
pub fn target_str(&self) -> &str
The target URI this spec will mint (hosts snapshot from it).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MintSpec
impl RefUnwindSafe for MintSpec
impl Send for MintSpec
impl Sync for MintSpec
impl Unpin for MintSpec
impl UnsafeUnpin for MintSpec
impl UnwindSafe for MintSpec
Blanket Implementations§
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