pub struct MinPartsForConcurrentDownload(_);
Expand description
The minimum number of parts a download must consist of for the parts to be downloaded concurrently
Depending on the part sizes it might be more efficient to set a number higer than 2. Downloading concurrently has an overhead.
This setting plays together with MinBytesForConcurrentDownload
.
Setting this value to 0 or 1 makes no sense and has no effect.
The default is 2.
Implementations
sourceimpl MinPartsForConcurrentDownload
impl MinPartsForConcurrentDownload
pub fn new<T>(v: T) -> MinPartsForConcurrentDownload where
T: Into<u64>,
sourceimpl MinPartsForConcurrentDownload
impl MinPartsForConcurrentDownload
sourcepub fn into_inner(self) -> u64
pub fn into_inner(self) -> u64
Returns the inner representation
sourceimpl MinPartsForConcurrentDownload
impl MinPartsForConcurrentDownload
sourcepub const ENV_TYPE_NAME: &'static str = &"MIN_PARTS_FOR_CONCURRENT_DOWNLOAD"
pub const ENV_TYPE_NAME: &'static str = &"MIN_PARTS_FOR_CONCURRENT_DOWNLOAD"
The default name of the environment variable for this type.
The name of the environment variable is “ MIN_PARTS_FOR_CONCURRENT_DOWNLOAD “
sourcepub fn try_from_env() -> Result<Option<MinPartsForConcurrentDownload>, Error>
pub fn try_from_env() -> Result<Option<MinPartsForConcurrentDownload>, Error>
Initialize from the environment.
Returns None
if the value was not found and fails if the value could not be parsed.
The name of the environment variable is “CONDOW_
MIN_PARTS_FOR_CONCURRENT_DOWNLOAD
“
sourcepub fn try_from_env_prefixed<T>(
prefix: T
) -> Result<Option<MinPartsForConcurrentDownload>, Error> where
T: Into<String>,
pub fn try_from_env_prefixed<T>(
prefix: T
) -> Result<Option<MinPartsForConcurrentDownload>, Error> where
T: Into<String>,
Initialize from the environment.
Returns None
if the value was not found and fails if the value could not be parsed.
The name of the environment variable is “prefix
_
MIN_PARTS_FOR_CONCURRENT_DOWNLOAD
“
The underscore and prefix will be omitted if prefix is empty.
sourcepub fn try_from_env_named<T>(
var_name: T
) -> Result<Option<MinPartsForConcurrentDownload>, Error> where
T: AsRef<str>,
pub fn try_from_env_named<T>(
var_name: T
) -> Result<Option<MinPartsForConcurrentDownload>, Error> where
T: AsRef<str>,
Initialize from the environment.
Returns None
if the value was not found and fails if the value could not be parsed.
The name of the environment variable is var_name
.
sourcepub fn try_from_env_type_name(
) -> Result<Option<MinPartsForConcurrentDownload>, Error>
pub fn try_from_env_type_name(
) -> Result<Option<MinPartsForConcurrentDownload>, Error>
Initialize from the environment.
Returns None
if the value was not found and fails if the value could not be parsed.
The name of the environment variable is “
MIN_PARTS_FOR_CONCURRENT_DOWNLOAD
“
sourcepub fn from_env() -> Result<MinPartsForConcurrentDownload, Error>
pub fn from_env() -> Result<MinPartsForConcurrentDownload, Error>
Initialize from the environment. Fails if the value was not found or if the value could not be parsed. The name of the environment variable is “CONDOW_ MIN_PARTS_FOR_CONCURRENT_DOWNLOAD “
sourcepub fn from_env_prefixed<T>(
prefix: T
) -> Result<MinPartsForConcurrentDownload, Error> where
T: Into<String>,
pub fn from_env_prefixed<T>(
prefix: T
) -> Result<MinPartsForConcurrentDownload, Error> where
T: Into<String>,
Initialize from the environment.
Fails if the value was not found or if the value could not be parsed.
The name of the environment variable is “prefix
_
MIN_PARTS_FOR_CONCURRENT_DOWNLOAD
“
The underscore and prefix will be omitted if prefix is empty.
sourcepub fn from_env_named<T>(
var_name: T
) -> Result<MinPartsForConcurrentDownload, Error> where
T: AsRef<str>,
pub fn from_env_named<T>(
var_name: T
) -> Result<MinPartsForConcurrentDownload, Error> where
T: AsRef<str>,
Initialize from the environment.
Fails if the value was not found or if the value could not be parsed.
The name of the environment variable is var_name
.
sourcepub fn from_env_type_name() -> Result<MinPartsForConcurrentDownload, Error>
pub fn from_env_type_name() -> Result<MinPartsForConcurrentDownload, Error>
Initialize from the environment. Fails if the value was not found or if the value could not be parsed. The name of the environment variable is “ MIN_PARTS_FOR_CONCURRENT_DOWNLOAD “
sourcepub fn from_env_opt() -> Option<MinPartsForConcurrentDownload>
pub fn from_env_opt() -> Option<MinPartsForConcurrentDownload>
Initialize from the environment.
Returns None
if the value could not be read for any reason.
The name of the environment variable is “CONDOW_
MIN_PARTS_FOR_CONCURRENT_DOWNLOAD
“
sourcepub fn from_env_opt_prefixed<T>(
prefix: T
) -> Option<MinPartsForConcurrentDownload> where
T: Into<String>,
pub fn from_env_opt_prefixed<T>(
prefix: T
) -> Option<MinPartsForConcurrentDownload> where
T: Into<String>,
Initialize from the environment.
Returns None
if the value could not be read for any reason.
The name of the environment variable is “prefix
_
MIN_PARTS_FOR_CONCURRENT_DOWNLOAD
“
The underscore and prefix will be omitted if prefix is empty.
sourcepub fn from_env_opt_named<T>(
var_name: T
) -> Option<MinPartsForConcurrentDownload> where
T: AsRef<str>,
pub fn from_env_opt_named<T>(
var_name: T
) -> Option<MinPartsForConcurrentDownload> where
T: AsRef<str>,
Initialize from the environment.
Returns None
if the value could not be read for any reason.
The name of the environment variable is var_name
.
sourcepub fn from_env_opt_type_name() -> Option<MinPartsForConcurrentDownload>
pub fn from_env_opt_type_name() -> Option<MinPartsForConcurrentDownload>
Initialize from the environment.
Returns None
if the value could not be read for any reason.
The name of the environment variable is “
MIN_PARTS_FOR_CONCURRENT_DOWNLOAD
“
Methods from Deref<Target = u64>
Trait Implementations
sourceimpl Clone for MinPartsForConcurrentDownload
impl Clone for MinPartsForConcurrentDownload
sourcefn clone(&self) -> MinPartsForConcurrentDownload
fn clone(&self) -> MinPartsForConcurrentDownload
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MinPartsForConcurrentDownload
impl Debug for MinPartsForConcurrentDownload
sourceimpl Default for MinPartsForConcurrentDownload
impl Default for MinPartsForConcurrentDownload
sourcefn default() -> MinPartsForConcurrentDownload
fn default() -> MinPartsForConcurrentDownload
Returns the “default value” for a type. Read more
sourceimpl Deref for MinPartsForConcurrentDownload
impl Deref for MinPartsForConcurrentDownload
sourceimpl DerefMut for MinPartsForConcurrentDownload
impl DerefMut for MinPartsForConcurrentDownload
sourcefn deref_mut(&mut self) -> &mut <MinPartsForConcurrentDownload as Deref>::Target
fn deref_mut(&mut self) -> &mut <MinPartsForConcurrentDownload as Deref>::Target
Mutably dereferences the value.
sourceimpl From<MinPartsForConcurrentDownload> for u64
impl From<MinPartsForConcurrentDownload> for u64
sourcefn from(v: MinPartsForConcurrentDownload) -> u64
fn from(v: MinPartsForConcurrentDownload) -> u64
Converts to this type from the input type.
sourceimpl From<u64> for MinPartsForConcurrentDownload
impl From<u64> for MinPartsForConcurrentDownload
sourcefn from(v: u64) -> MinPartsForConcurrentDownload
fn from(v: u64) -> MinPartsForConcurrentDownload
Converts to this type from the input type.
sourceimpl PartialEq<MinPartsForConcurrentDownload> for MinPartsForConcurrentDownload
impl PartialEq<MinPartsForConcurrentDownload> for MinPartsForConcurrentDownload
sourcefn eq(&self, other: &MinPartsForConcurrentDownload) -> bool
fn eq(&self, other: &MinPartsForConcurrentDownload) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MinPartsForConcurrentDownload) -> bool
fn ne(&self, other: &MinPartsForConcurrentDownload) -> bool
This method tests for !=
.
impl Copy for MinPartsForConcurrentDownload
impl Eq for MinPartsForConcurrentDownload
impl StructuralEq for MinPartsForConcurrentDownload
impl StructuralPartialEq for MinPartsForConcurrentDownload
Auto Trait Implementations
impl RefUnwindSafe for MinPartsForConcurrentDownload
impl Send for MinPartsForConcurrentDownload
impl Sync for MinPartsForConcurrentDownload
impl Unpin for MinPartsForConcurrentDownload
impl UnwindSafe for MinPartsForConcurrentDownload
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more