pub enum OnProgressCallback<'r> {
    Boxed(Box<dyn Fn(TransferProgressInfo<'_>) -> AnyResult<()> + Send + Sync + 'r>),
    Referenced(&'r (dyn Fn(TransferProgressInfo<'_>) -> AnyResult<()> + Send + Sync + 'r)),
}
Expand description

上传进度回调

Variants§

§

Boxed(Box<dyn Fn(TransferProgressInfo<'_>) -> AnyResult<()> + Send + Sync + 'r>)

用 Box 包装的上传进度回调

§

Referenced(&'r (dyn Fn(TransferProgressInfo<'_>) -> AnyResult<()> + Send + Sync + 'r))

上传进度回调的引用

Implementations§

创建回调函数

创建回调函数的引用

Trait Implementations§

Formats the value using the given formatter. Read more
The resulting type after dereferencing.
Dereferences the value.
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.