pub struct EnsureActivePull(/* private fields */);Expand description
Make sure that the network stream is always actively pulled into an intermediate buffer.
This is not always the case since some low concurrency downloads require the strem to be actively pulled.
This also allows for detection of panics.
The default is false which means this feature is turned off.
Implementations§
Source§impl EnsureActivePull
impl EnsureActivePull
Sourcepub fn into_inner(self) -> bool
pub fn into_inner(self) -> bool
Returns the inner representation
Source§impl EnsureActivePull
impl EnsureActivePull
Sourcepub const ENV_TYPE_NAME: &'static str
pub const ENV_TYPE_NAME: &'static str
The default name of the environment variable for this type.
The name of the environment variable is “ ENSURE_ACTIVE_PULL “
Sourcepub fn try_from_env() -> Result<Option<Self>, Error>
pub fn try_from_env() -> Result<Option<Self>, 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_
ENSURE_ACTIVE_PULL
“
Sourcepub fn try_from_env_prefixed<T: Into<String>>(
prefix: T,
) -> Result<Option<Self>, Error>
pub fn try_from_env_prefixed<T: Into<String>>( prefix: T, ) -> Result<Option<Self>, 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 “prefix_
ENSURE_ACTIVE_PULL
“
The underscore and prefix will be omitted if prefix is empty.
Sourcepub fn try_from_env_named<T: AsRef<str>>(
var_name: T,
) -> Result<Option<Self>, Error>
pub fn try_from_env_named<T: AsRef<str>>( var_name: T, ) -> Result<Option<Self>, 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 var_name.
Sourcepub fn try_from_env_type_name() -> Result<Option<Self>, Error>
pub fn try_from_env_type_name() -> Result<Option<Self>, 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 “
ENSURE_ACTIVE_PULL
“
Sourcepub fn from_env() -> Result<Self, Error>
pub fn from_env() -> Result<Self, 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_ ENSURE_ACTIVE_PULL “
Sourcepub fn from_env_prefixed<T: Into<String>>(prefix: T) -> Result<Self, Error>
pub fn from_env_prefixed<T: Into<String>>(prefix: T) -> Result<Self, 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 “prefix_
ENSURE_ACTIVE_PULL
“
The underscore and prefix will be omitted if prefix is empty.
Sourcepub fn from_env_named<T: AsRef<str>>(var_name: T) -> Result<Self, Error>
pub fn from_env_named<T: AsRef<str>>(var_name: T) -> Result<Self, 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 var_name.
Sourcepub fn from_env_type_name() -> Result<Self, Error>
pub fn from_env_type_name() -> Result<Self, 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 “ ENSURE_ACTIVE_PULL “
Sourcepub fn from_env_opt() -> Option<Self>
pub fn from_env_opt() -> Option<Self>
Initialize from the environment.
Returns None if the value could not be read for any reason.
The name of the environment variable is “CONDOW_
ENSURE_ACTIVE_PULL
“
Sourcepub fn from_env_opt_prefixed<T: Into<String>>(prefix: T) -> Option<Self>
pub fn from_env_opt_prefixed<T: Into<String>>(prefix: T) -> Option<Self>
Initialize from the environment.
Returns None if the value could not be read for any reason.
The name of the environment variable is “prefix_
ENSURE_ACTIVE_PULL
“
The underscore and prefix will be omitted if prefix is empty.
Sourcepub fn from_env_opt_named<T: AsRef<str>>(var_name: T) -> Option<Self>
pub fn from_env_opt_named<T: AsRef<str>>(var_name: T) -> Option<Self>
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<Self>
pub fn from_env_opt_type_name() -> Option<Self>
Initialize from the environment.
Returns None if the value could not be read for any reason.
The name of the environment variable is “
ENSURE_ACTIVE_PULL
“
Trait Implementations§
Source§impl Clone for EnsureActivePull
impl Clone for EnsureActivePull
Source§fn clone(&self) -> EnsureActivePull
fn clone(&self) -> EnsureActivePull
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more