#[non_exhaustive]pub enum AssetSource {
Vendored(&'static [u8]),
External {
hint: &'static str,
},
Download {
files: &'static [DownloadFile],
},
PinnedArchive {
archives: &'static [PinnedArchive],
},
}Expand description
Where an asset comes from.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Vendored(&'static [u8])
Bytes compiled into this binary, installed as a single file.
External
A directory the operator provisions, which Roteiro verifies and pins but
never fetches. hint is the exact command that obtains it.
Download
A set of files downloaded by URL into one directory, digest-pinned at provisioning time.
Downloading happens only in provision_with, and only with a fetcher
the caller supplied. There is no compile-time digest because the upstream
files are republished continuously — OSV rebuilds its per-ecosystem
databases daily — so what is pinned is the snapshot this machine
provisioned, recorded in InstalledAsset::digest and re-checked on
every run. That is the same pin the RustSec checkout gets, and it is
the one that can actually be honoured.
Fields
files: &'static [DownloadFile]Each file’s path relative to the asset directory, and where it comes
from. Order is preserved so prefetch reports progress in a stable
sequence.
PinnedArchive
A single published release artifact with a compile-time SHA-256, installed as one file and selected by host platform.
Verified in this crate, before installation and again by build.rs
before anything is built against it — so neither a lying fetcher nor a
redirected URL can substitute different bytes. See
crate::runtime_pins for what is pinned and why it has to be.
Fields
archives: &'static [PinnedArchive]One entry per supported host platform. A host not listed here cannot be provisioned, and is told which platforms are.
Trait Implementations§
Source§impl Clone for AssetSource
impl Clone for AssetSource
Source§fn clone(&self) -> AssetSource
fn clone(&self) -> AssetSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AssetSource
Source§impl Debug for AssetSource
impl Debug for AssetSource
impl Eq for AssetSource
Source§impl PartialEq for AssetSource
impl PartialEq for AssetSource
impl StructuralPartialEq for AssetSource
Auto Trait Implementations§
impl Freeze for AssetSource
impl RefUnwindSafe for AssetSource
impl Send for AssetSource
impl Sync for AssetSource
impl Unpin for AssetSource
impl UnsafeUnpin for AssetSource
impl UnwindSafe for AssetSource
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.