Struct qiniu_download::Config
source · [−]pub struct Config { /* private fields */ }
Expand description
单集群七牛配置信息
Implementations
sourceimpl Config
impl Config
sourcepub fn builder(
access_key: impl Into<String>,
secret_key: impl Into<String>,
bucket: impl Into<String>,
io_urls: Option<Vec<String>>
) -> ConfigBuilder
pub fn builder(
access_key: impl Into<String>,
secret_key: impl Into<String>,
bucket: impl Into<String>,
io_urls: Option<Vec<String>>
) -> ConfigBuilder
创建七牛配置信息构建器
sourcepub fn access_key(&self) -> &str
pub fn access_key(&self) -> &str
获取七牛 Access Key
sourcepub fn set_access_key(&mut self, access_key: impl Into<String>) -> &mut Self
pub fn set_access_key(&mut self, access_key: impl Into<String>) -> &mut Self
设置七牛 Access Key
sourcepub fn secret_key(&self) -> &str
pub fn secret_key(&self) -> &str
获取七牛 Secret Key
sourcepub fn set_secret_key(&mut self, secret_key: impl Into<String>) -> &mut Self
pub fn set_secret_key(&mut self, secret_key: impl Into<String>) -> &mut Self
设置七牛 Secret Key
sourcepub fn set_bucket(&mut self, bucket: impl Into<String>) -> &mut Self
pub fn set_bucket(&mut self, bucket: impl Into<String>) -> &mut Self
设置七牛存储空间
sourcepub fn set_io_urls(
&mut self,
io_urls: Option<impl Into<Vec<String>>>
) -> &mut Self
pub fn set_io_urls(
&mut self,
io_urls: Option<impl Into<Vec<String>>>
) -> &mut Self
设置 IO 服务器 URL 列表
sourcepub fn set_uc_urls(
&mut self,
uc_urls: Option<impl Into<Vec<String>>>
) -> &mut Self
pub fn set_uc_urls(
&mut self,
uc_urls: Option<impl Into<Vec<String>>>
) -> &mut Self
设置 UC 服务器 URL 列表
sourcepub fn monitor_urls(&self) -> Option<&[String]>
pub fn monitor_urls(&self) -> Option<&[String]>
获取监控服务器服务器 URL 列表
sourcepub fn set_monitor_urls(
&mut self,
monitor_urls: Option<impl Into<Vec<String>>>
) -> &mut Self
pub fn set_monitor_urls(
&mut self,
monitor_urls: Option<impl Into<Vec<String>>>
) -> &mut Self
设置监控服务器 URL 列表
sourcepub fn use_getfile_api(&self) -> Option<bool>
pub fn use_getfile_api(&self) -> Option<bool>
是否使用 Getfile API
sourcepub fn set_use_getfile_api(
&mut self,
use_getfile_api: Option<bool>
) -> &mut Self
pub fn set_use_getfile_api(
&mut self,
use_getfile_api: Option<bool>
) -> &mut Self
设置是否使用 Getfile API
sourcepub fn normalize_key(&self) -> Option<bool>
pub fn normalize_key(&self) -> Option<bool>
是否对 key 进行格式化
sourcepub fn set_normalize_key(&mut self, normalize_key: Option<bool>) -> &mut Self
pub fn set_normalize_key(&mut self, normalize_key: Option<bool>) -> &mut Self
设置是否对 key 进行格式化
sourcepub fn set_private(&mut self, private: Option<bool>) -> &mut Self
pub fn set_private(&mut self, private: Option<bool>) -> &mut Self
设置是否使用私有存储空间
sourcepub fn dot_interval(&self) -> Option<Duration>
pub fn dot_interval(&self) -> Option<Duration>
获取打点记录上传频率
sourcepub fn set_dot_interval(&mut self, dot_interval: Option<Duration>) -> &mut Self
pub fn set_dot_interval(&mut self, dot_interval: Option<Duration>) -> &mut Self
设置打点记录上传频率
sourcepub fn max_dot_buffer_size(&self) -> Option<u64>
pub fn max_dot_buffer_size(&self) -> Option<u64>
获取打点记录本地缓存文件尺寸上限
sourcepub fn set_max_dot_buffer_size(
&mut self,
max_dot_buffer_size: Option<u64>
) -> &mut Self
pub fn set_max_dot_buffer_size(
&mut self,
max_dot_buffer_size: Option<u64>
) -> &mut Self
设置打点记录本地缓存文件尺寸上限
sourcepub fn punish_time(&self) -> Option<Duration>
pub fn punish_time(&self) -> Option<Duration>
获取域名访问失败后的惩罚时长
sourcepub fn set_punish_time(&mut self, punish_time: Option<Duration>) -> &mut Self
pub fn set_punish_time(&mut self, punish_time: Option<Duration>) -> &mut Self
设置域名访问失败后的惩罚时长
sourcepub fn base_timeout(&self) -> Option<Duration>
pub fn base_timeout(&self) -> Option<Duration>
获取域名访问的基础超时时长
sourcepub fn set_base_timeout(&mut self, base_timeout: Option<Duration>) -> &mut Self
pub fn set_base_timeout(&mut self, base_timeout: Option<Duration>) -> &mut Self
设置域名访问失败后的惩罚时长
sourcepub fn connect_timeout(&self) -> Option<Duration>
pub fn connect_timeout(&self) -> Option<Duration>
获取域名连接的超时时长
sourcepub fn set_connect_timeout(
&mut self,
connect_timeout: Option<Duration>
) -> &mut Self
pub fn set_connect_timeout(
&mut self,
connect_timeout: Option<Duration>
) -> &mut Self
设置域名连接的超时时长
sourcepub fn max_retry_concurrency(&self) -> Option<u32>
pub fn max_retry_concurrency(&self) -> Option<u32>
获取最大并行重试次数
sourcepub fn set_max_retry_concurrency(
&mut self,
max_retry_concurrency: Option<u32>
) -> &mut Self
pub fn set_max_retry_concurrency(
&mut self,
max_retry_concurrency: Option<u32>
) -> &mut Self
设置最大并行重试次数,如果设置为 Some(0) 则表示禁止并行重试功能
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl From<Config> for Configurable
impl From<Config> for Configurable
sourcefn from(config: SingleClusterConfig) -> Self
fn from(config: SingleClusterConfig) -> Self
Converts to this type from the input type.
sourceimpl From<Config> for ConfigBuilder
impl From<Config> for ConfigBuilder
impl Eq for Config
impl StructuralEq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
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> Pipe for T where
T: ?Sized,
impl<T> Pipe for T where
T: ?Sized,
sourcefn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
Pipes by value. This is generally the method you want to use. Read more
sourcefn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
Borrows self
and passes that borrow into the pipe function. Read more
sourcefn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
Mutably borrows self
and passes that borrow into the pipe function. Read more
sourcefn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
Borrows self
, then passes self.borrow()
into the pipe function. Read more
sourcefn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
Mutably borrows self
, then passes self.borrow_mut()
into the pipe
function. Read more
sourcefn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
Borrows self
, then passes self.as_ref()
into the pipe function.
sourcefn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R where
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R where
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
Mutably borrows self
, then passes self.as_mut()
into the pipe
function. Read more
sourceimpl<T> Tap for T
impl<T> Tap for T
sourcefn tap_mut(self, func: impl for<'_> FnOnce(&mut Self)) -> Self
fn tap_mut(self, func: impl for<'_> FnOnce(&mut Self)) -> Self
Mutable access to a value. Read more
sourcefn tap_borrow<B>(self, func: impl for<'_> FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl for<'_> FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Immutable access to the Borrow<B>
of a value. Read more
sourcefn tap_borrow_mut<B>(self, func: impl for<'_> FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl for<'_> FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Mutable access to the BorrowMut<B>
of a value. Read more
sourcefn tap_ref<R>(self, func: impl for<'_> FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl for<'_> FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Immutable access to the AsRef<R>
view of a value. Read more
sourcefn tap_ref_mut<R>(self, func: impl for<'_> FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl for<'_> FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Mutable access to the AsMut<R>
view of a value. Read more
sourcefn tap_deref<T>(self, func: impl for<'_> FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl for<'_> FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Immutable access to the Deref::Target
of a value. Read more
sourcefn tap_deref_mut<T>(self, func: impl for<'_> FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl for<'_> FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Mutable access to the Deref::Target
of a value. Read more
sourcefn tap_dbg(self, func: impl for<'_> FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl for<'_> FnOnce(&Self)) -> Self
Calls .tap()
only in debug builds, and is erased in release builds.
sourcefn tap_mut_dbg(self, func: impl for<'_> FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl for<'_> FnOnce(&mut Self)) -> Self
Calls .tap_mut()
only in debug builds, and is erased in release
builds. Read more
sourcefn tap_borrow_dbg<B>(self, func: impl for<'_> FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl for<'_> FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Calls .tap_borrow()
only in debug builds, and is erased in release
builds. Read more
sourcefn tap_borrow_mut_dbg<B>(self, func: impl for<'_> FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl for<'_> FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Calls .tap_borrow_mut()
only in debug builds, and is erased in release
builds. Read more
sourcefn tap_ref_dbg<R>(self, func: impl for<'_> FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl for<'_> FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Calls .tap_ref()
only in debug builds, and is erased in release
builds. Read more
sourcefn tap_ref_mut_dbg<R>(self, func: impl for<'_> FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl for<'_> FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Calls .tap_ref_mut()
only in debug builds, and is erased in release
builds. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
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