pub trait UpdateProvider: Send + Sync {
// Required methods
fn latest(
&self,
request: &UpdateRequest,
) -> UpdateResult<Option<ArtifactDescriptor>>;
fn fetch(
&self,
artifact: &ArtifactDescriptor,
max_bytes: usize,
) -> UpdateResult<Vec<u8>>;
}Expand description
Provider contract for listing and fetching opaque application artifacts.
Required Methods§
Sourcefn latest(
&self,
request: &UpdateRequest,
) -> UpdateResult<Option<ArtifactDescriptor>>
fn latest( &self, request: &UpdateRequest, ) -> UpdateResult<Option<ArtifactDescriptor>>
Returns the newest eligible artifact, or None when no update exists.
Sourcefn fetch(
&self,
artifact: &ArtifactDescriptor,
max_bytes: usize,
) -> UpdateResult<Vec<u8>>
fn fetch( &self, artifact: &ArtifactDescriptor, max_bytes: usize, ) -> UpdateResult<Vec<u8>>
Fetches complete artifact bytes while respecting max_bytes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".