pub struct SetImageState<'a> {
pub hash: Option<&'a [u8; 32]>,
pub confirm: bool,
}Expand description
Set Image State command
Fields§
§hash: Option<&'a [u8; 32]>SHA256 hash of the image header and body
If confirm is true this can be omitted, which will select the currently running image.
Note that this will not be the same as the SHA256 of the whole file, it is the field in the MCUboot TLV section that contains a hash of the data which is used for signature verification purposes.
confirm: boolIf true, mark the given image as ‘confirmed’.
If false, perform a test boot with the given image and revert upon hard reset.
Trait Implementations§
Source§impl<'a> Debug for SetImageState<'a>
impl<'a> Debug for SetImageState<'a>
Source§impl McuMgrCommand for SetImageState<'_>
impl McuMgrCommand for SetImageState<'_>
Source§type Payload = SetImageState<'_>
type Payload = SetImageState<'_>
the data payload type
Source§type Response = ImageStateResponse
type Response = ImageStateResponse
the response type of the command
Source§fn is_write_operation(&self) -> bool
fn is_write_operation(&self) -> bool
whether this command is a read or write operation
Source§fn command_id(&self) -> u8
fn command_id(&self) -> u8
the command ID
Source§impl<'a> PartialEq for SetImageState<'a>
impl<'a> PartialEq for SetImageState<'a>
Source§impl<'a> Serialize for SetImageState<'a>
impl<'a> Serialize for SetImageState<'a>
impl<'a> Eq for SetImageState<'a>
impl<'a> StructuralPartialEq for SetImageState<'a>
Auto Trait Implementations§
impl<'a> Freeze for SetImageState<'a>
impl<'a> RefUnwindSafe for SetImageState<'a>
impl<'a> Send for SetImageState<'a>
impl<'a> Sync for SetImageState<'a>
impl<'a> Unpin for SetImageState<'a>
impl<'a> UnwindSafe for SetImageState<'a>
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