pub struct UploadOptions {
pub dest_filename: String,
pub compression: Compression,
pub dummy: bool,
pub chunk_size: usize,
pub progress: Option<ProgressCallback>,
}Available on (crate features
blocking or tokio or serial) and (crate features blocking or tokio) only.Expand description
Caller-supplied options controlling the upload.
Not Clone because progress holds a FnMut closure.
Debug is implemented manually for the same reason.
Fields§
§dest_filename: StringDestination filename on the device’s SD card. Required.
compression: CompressionCompression preference. Defaults to Compression::None.
dummy: boolSet to true to make the device pretend to receive a file without actually writing it; useful for protocol smoke tests.
chunk_size: usizeBytes per WRITE packet. Capped to the device-advertised maximum
after the SYNC handshake completes. 0 means “use the device’s
max_block_size verbatim”.
progress: Option<ProgressCallback>Optional per-chunk progress callback fired once after each
acknowledged WRITE. See Progress for the payload.
Trait Implementations§
Source§impl Debug for UploadOptions
impl Debug for UploadOptions
Auto Trait Implementations§
impl Freeze for UploadOptions
impl !RefUnwindSafe for UploadOptions
impl Send for UploadOptions
impl !Sync for UploadOptions
impl Unpin for UploadOptions
impl UnsafeUnpin for UploadOptions
impl !UnwindSafe for UploadOptions
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