#[non_exhaustive]
pub struct DownloadOptions { pub progress: Option<FlashProgress>, pub keep_unwritten_bytes: bool, pub dry_run: bool, pub do_chip_erase: bool, pub skip_erase: bool, pub verify: bool, pub disable_double_buffering: bool, }
Expand description

Options for downloading a file onto a target chip.

This struct should be created using the DownloadOptions::default() function, and can be configured by setting the fields directly:

use probe_rs::flashing::DownloadOptions;

let mut options = DownloadOptions::default();

options.verify = true;

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§progress: Option<FlashProgress>

An optional progress reporter which is used if this argument is set to Some(...).

§keep_unwritten_bytes: bool

If keep_unwritten_bytes is true, erased portions of the flash that are not overwritten by the ELF data are restored afterwards, such that the old contents are untouched.

This is necessary because the flash can only be erased in sectors. If only parts of the erased sector are written thereafter, instead of the full sector, the excessively erased bytes wont match the contents before the erase which might not be intuitive to the user or even worse, result in unexpected behavior if those contents contain important data.

§dry_run: bool

Perform a dry run. This prepares everything for flashing, but does not write anything to flash.

§do_chip_erase: bool

If this flag is set to true, probe-rs will try to use the chips built in method to do a full chip erase if one is available. This is often faster than erasing a lot of single sectors. So if you do not need the old contents of the flash, this is a good option.

§skip_erase: bool

If the chip was pre-erased with external erasers, this flag can set to true to skip erasing It may be useful for mass production.

§verify: bool

After flashing, read back all the flashed data to verify it has been written correctly.

§disable_double_buffering: bool

Disable double buffering when loading flash.

Implementations§

DownloadOptions with default values.

Trait Implementations§

Returns the “default value” for a type. Read more

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
Converts self into T using Into<T>. Read more
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when Debug-formatted.
Causes self to use its LowerExp implementation when Debug-formatted.
Causes self to use its LowerHex implementation when Debug-formatted.
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when Debug-formatted.
Causes self to use its UpperExp implementation when Debug-formatted.
Causes self to use its UpperHex implementation when Debug-formatted.
Formats each item in a sequence. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function.
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function.
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds.
Calls .tap_borrow() only in debug builds, and is erased in release builds.
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Calls .tap_ref() only in debug builds, and is erased in release builds.
Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Calls .tap_deref() only in debug builds, and is erased in release builds.
Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Attempts to convert self into T using TryInto<T>. Read more
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.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more