pub struct FetchConfig { /* private fields */ }Expand description
Configuration options for tuning the fetch process.
Note that these are not used directly by FetcherState, but are
maintained within the state so that the options can be tracked across queued
fetches.
Implementations§
Source§impl FetchConfig
impl FetchConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct the default FetchConfig.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set the FetchConfig::timeout to the given time::Duration.
Sourcepub fn with_fetch_config(self, config: Config) -> Self
pub fn with_fetch_config(self, config: Config) -> Self
Set the FetchConfig::fetch_config to the given radicle_fetch::Config.
Sourcepub fn with_minimum_feature_level(self, feature_level: FeatureLevel) -> Self
pub fn with_minimum_feature_level(self, feature_level: FeatureLevel) -> Self
Set the minimum feature level, within the FetchConfig::fetch_config,
to the given FeatureLevel.
Sourcepub fn fetch_config(&self) -> Config
pub fn fetch_config(&self) -> Config
Return the radicle_fetch::Config configured for this fetch.
Trait Implementations§
Source§impl Clone for FetchConfig
impl Clone for FetchConfig
Source§fn clone(&self) -> FetchConfig
fn clone(&self) -> FetchConfig
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 FetchConfig
impl Debug for FetchConfig
Source§impl Default for FetchConfig
impl Default for FetchConfig
Source§impl Hash for FetchConfig
impl Hash for FetchConfig
Source§impl PartialEq for FetchConfig
impl PartialEq for FetchConfig
Source§fn eq(&self, other: &FetchConfig) -> bool
fn eq(&self, other: &FetchConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for FetchConfig
impl Eq for FetchConfig
impl StructuralPartialEq for FetchConfig
Auto Trait Implementations§
impl Freeze for FetchConfig
impl RefUnwindSafe for FetchConfig
impl Send for FetchConfig
impl Sync for FetchConfig
impl Unpin for FetchConfig
impl UnsafeUnpin for FetchConfig
impl UnwindSafe for FetchConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
Compare self to
key and return true if they are equal.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