pub struct ArtifactSpec {
pub blob_hash: String,
pub size_bytes: u64,
pub artifact_type: ArtifactType,
pub sha256: Option<String>,
pub name: Option<String>,
pub version: Option<String>,
}Expand description
Artifact specification for deployment
Fields§
§blob_hash: StringBlob hash (content-addressed)
size_bytes: u64Size in bytes
artifact_type: ArtifactTypeArtifact type
sha256: Option<String>SHA256 hash for verification (if different from blob hash)
name: Option<String>Human-readable name
version: Option<String>Version string
Implementations§
Source§impl ArtifactSpec
impl ArtifactSpec
Sourcepub fn onnx_model(
blob_hash: impl Into<String>,
size_bytes: u64,
execution_providers: Vec<String>,
) -> Self
pub fn onnx_model( blob_hash: impl Into<String>, size_bytes: u64, execution_providers: Vec<String>, ) -> Self
Create ONNX model artifact spec
Sourcepub fn container(
blob_hash: impl Into<String>,
size_bytes: u64,
runtime: ContainerRuntime,
) -> Self
pub fn container( blob_hash: impl Into<String>, size_bytes: u64, runtime: ContainerRuntime, ) -> Self
Create container artifact spec
Sourcepub fn native_binary(
blob_hash: impl Into<String>,
size_bytes: u64,
arch: impl Into<String>,
) -> Self
pub fn native_binary( blob_hash: impl Into<String>, size_bytes: u64, arch: impl Into<String>, ) -> Self
Create native binary artifact spec
Sourcepub fn with_version(self, version: impl Into<String>) -> Self
pub fn with_version(self, version: impl Into<String>) -> Self
Set version
Sourcepub fn with_sha256(self, sha256: impl Into<String>) -> Self
pub fn with_sha256(self, sha256: impl Into<String>) -> Self
Set SHA256 hash
Trait Implementations§
Source§impl Clone for ArtifactSpec
impl Clone for ArtifactSpec
Source§fn clone(&self) -> ArtifactSpec
fn clone(&self) -> ArtifactSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArtifactSpec
impl Debug for ArtifactSpec
Source§impl Default for ArtifactSpec
impl Default for ArtifactSpec
Source§fn default() -> ArtifactSpec
fn default() -> ArtifactSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ArtifactSpec
impl<'de> Deserialize<'de> for ArtifactSpec
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ArtifactSpec
impl RefUnwindSafe for ArtifactSpec
impl Send for ArtifactSpec
impl Sync for ArtifactSpec
impl Unpin for ArtifactSpec
impl UnsafeUnpin for ArtifactSpec
impl UnwindSafe for ArtifactSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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