pub struct StaticSources<S> { /* private fields */ }Expand description
A [SourceProvider] over a fixed set of prebuilt lanes: for SDK callers
that dial their own providers, and for tests. Discovery returns the same
set; each lane is handed out once. So a static set serves one blob’s
[SourceSet]: a crate::Downloader over it fetches one target, and a
second target finds no lane to build.
Implementations§
Source§impl<S> StaticSources<S>
impl<S> StaticSources<S>
Sourcepub fn new(candidates: Vec<StreamCandidate<S>>) -> Result<Self>
pub fn new(candidates: Vec<StreamCandidate<S>>) -> Result<Self>
Wrap candidates, keyed by each one’s on-chain provider. Each one is
a probed holder (Holder::probed_holder).
§Errors
No candidate at all (its discovery could never find one), or two candidates naming the same provider.
Trait Implementations§
Auto Trait Implementations§
impl<S> !Freeze for StaticSources<S>
impl<S> RefUnwindSafe for StaticSources<S>
impl<S> Send for StaticSources<S>
impl<S> Sync for StaticSources<S>
impl<S> Unpin for StaticSources<S>
impl<S> UnsafeUnpin for StaticSources<S>
impl<S> UnwindSafe for StaticSources<S>
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> 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