pub struct ArtifactDescriptor { /* private fields */ }Expand description
Immutable application artifact published by an update provider.
Implementations§
Source§impl ArtifactDescriptor
impl ArtifactDescriptor
Sourcepub fn new(
application_id: ApplicationId,
application_version: impl Into<String>,
build_id: BuildId,
channel: impl Into<String>,
runtime_requirement: impl Into<String>,
protocol_version: impl Into<String>,
artifact_reference: impl Into<String>,
sha256: impl Into<String>,
size_bytes: u64,
) -> UpdateResult<Self>
pub fn new( application_id: ApplicationId, application_version: impl Into<String>, build_id: BuildId, channel: impl Into<String>, runtime_requirement: impl Into<String>, protocol_version: impl Into<String>, artifact_reference: impl Into<String>, sha256: impl Into<String>, size_bytes: u64, ) -> UpdateResult<Self>
Creates and validates an immutable artifact descriptor.
Sourcepub fn with_ed25519_signature(
self,
signing_key_id: impl Into<String>,
signature: impl Into<String>,
) -> UpdateResult<Self>
pub fn with_ed25519_signature( self, signing_key_id: impl Into<String>, signature: impl Into<String>, ) -> UpdateResult<Self>
Adds the Ed25519 signing key identity and detached signature.
Sourcepub fn application_id(&self) -> &ApplicationId
pub fn application_id(&self) -> &ApplicationId
Returns the application identity.
Sourcepub fn application_version(&self) -> &str
pub fn application_version(&self) -> &str
Returns the semantic application version.
Sourcepub fn runtime_requirement(&self) -> &str
pub fn runtime_requirement(&self) -> &str
Returns the runtime semantic-version requirement.
Sourcepub fn protocol_version(&self) -> &str
pub fn protocol_version(&self) -> &str
Returns the required distributed protocol version.
Sourcepub fn artifact_reference(&self) -> &str
pub fn artifact_reference(&self) -> &str
Returns the opaque provider reference used to fetch bytes.
Sourcepub fn size_bytes(&self) -> u64
pub fn size_bytes(&self) -> u64
Returns the declared artifact size.
Sourcepub fn signing_key_id(&self) -> Option<&str>
pub fn signing_key_id(&self) -> Option<&str>
Returns the configured signing key identity.
Sourcepub fn ed25519_signature(&self) -> Option<&str>
pub fn ed25519_signature(&self) -> Option<&str>
Returns the lowercase hexadecimal Ed25519 signature.
Sourcepub fn ensure_compatible(
&self,
runtime_version: &str,
protocol_version: &str,
) -> UpdateResult<()>
pub fn ensure_compatible( &self, runtime_version: &str, protocol_version: &str, ) -> UpdateResult<()>
Checks runtime and protocol compatibility.
Trait Implementations§
Source§impl Clone for ArtifactDescriptor
impl Clone for ArtifactDescriptor
Source§fn clone(&self) -> ArtifactDescriptor
fn clone(&self) -> ArtifactDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ArtifactDescriptor
impl Debug for ArtifactDescriptor
Source§impl<'de> Deserialize<'de> for ArtifactDescriptor
impl<'de> Deserialize<'de> for ArtifactDescriptor
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
impl Eq for ArtifactDescriptor
Source§impl PartialEq for ArtifactDescriptor
impl PartialEq for ArtifactDescriptor
Source§impl Serialize for ArtifactDescriptor
impl Serialize for ArtifactDescriptor
impl StructuralPartialEq for ArtifactDescriptor
Auto Trait Implementations§
impl Freeze for ArtifactDescriptor
impl RefUnwindSafe for ArtifactDescriptor
impl Send for ArtifactDescriptor
impl Sync for ArtifactDescriptor
impl Unpin for ArtifactDescriptor
impl UnsafeUnpin for ArtifactDescriptor
impl UnwindSafe for ArtifactDescriptor
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