pub struct ReleaseBuilder { /* private fields */ }Expand description
Builder that collects everything needed for a signed release.
Implementations§
Source§impl ReleaseBuilder
impl ReleaseBuilder
Sourcepub fn new(
name: impl Into<String>,
version: impl Into<String>,
format: impl Into<String>,
) -> Self
pub fn new( name: impl Into<String>, version: impl Into<String>, format: impl Into<String>, ) -> Self
Start a new builder for (name, version, format).
Sourcepub fn primary_artifact(
&mut self,
name: impl Into<String>,
bytes: Vec<u8>,
) -> &mut Self
pub fn primary_artifact( &mut self, name: impl Into<String>, bytes: Vec<u8>, ) -> &mut Self
Register the primary artifact (the model weights).
Sourcepub fn add_auxiliary(
&mut self,
name: impl Into<String>,
bytes: Vec<u8>,
) -> &mut Self
pub fn add_auxiliary( &mut self, name: impl Into<String>, bytes: Vec<u8>, ) -> &mut Self
Register an auxiliary artifact (tokenizer, config, sidecar).
Sourcepub fn add_framework(&mut self, f: FrameworkRef) -> &mut Self
pub fn add_framework(&mut self, f: FrameworkRef) -> &mut Self
AIBOM framework entry.
Sourcepub fn add_dataset(&mut self, d: DatasetRef) -> &mut Self
pub fn add_dataset(&mut self, d: DatasetRef) -> &mut Self
AIBOM dataset entry.
Sourcepub fn add_license(&mut self, l: License) -> &mut Self
pub fn add_license(&mut self, l: License) -> &mut Self
AIBOM license entry.
Sourcepub fn hyperparameter(&mut self, k: impl Into<String>, v: Value) -> &mut Self
pub fn hyperparameter(&mut self, k: impl Into<String>, v: Value) -> &mut Self
AIBOM hyperparameter (arbitrary JSON value).
Sourcepub fn add_safety_attestation(&mut self, s: SafetyAttestation) -> &mut Self
pub fn add_safety_attestation(&mut self, s: SafetyAttestation) -> &mut Self
AIBOM safety attestation entry.
Sourcepub fn add_export_control(&mut self, e: ExportControl) -> &mut Self
pub fn add_export_control(&mut self, e: ExportControl) -> &mut Self
AIBOM export-control entry.
Sourcepub fn add_reference(&mut self, r: ExternalReference) -> &mut Self
pub fn add_reference(&mut self, r: ExternalReference) -> &mut Self
AIBOM external reference (model card, paper).
Sourcepub fn builder_id(&mut self, id: impl Into<String>) -> &mut Self
pub fn builder_id(&mut self, id: impl Into<String>) -> &mut Self
SLSA builder.id — the CI / build-system URI. Required.
Sourcepub fn external_parameters(&mut self, v: Value) -> &mut Self
pub fn external_parameters(&mut self, v: Value) -> &mut Self
SLSA externalParameters blob.
Sourcepub fn current_aion_version(&mut self, v: u64) -> &mut Self
pub fn current_aion_version(&mut self, v: u64) -> &mut Self
aion version number at seal time.
Sourcepub fn seal(
self,
signer: AuthorId,
signing_key: &SigningKey,
log: &mut TransparencyLog,
) -> Result<SignedRelease>
pub fn seal( self, signer: AuthorId, signing_key: &SigningKey, log: &mut TransparencyLog, ) -> Result<SignedRelease>
Seal the release: produce every signed artifact, append the three log entries, and build the OCI manifest graph.
§Errors
Returns Err if the primary artifact is missing, the
builder_id is empty, or any downstream module rejects the
inputs (e.g. SLSA’s non-empty-subject requirement).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReleaseBuilder
impl RefUnwindSafe for ReleaseBuilder
impl Send for ReleaseBuilder
impl Sync for ReleaseBuilder
impl Unpin for ReleaseBuilder
impl UnsafeUnpin for ReleaseBuilder
impl UnwindSafe for ReleaseBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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