pub struct SetImageState<'a> {
pub hash: Option<&'a [u8]>,
pub confirm: bool,
}Expand description
Set Image State command
Fields§
§hash: Option<&'a [u8]>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> Clone for SetImageState<'a>
impl<'a> Clone for SetImageState<'a>
Source§fn clone(&self) -> SetImageState<'a>
fn clone(&self) -> SetImageState<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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§fn eq(&self, other: &SetImageState<'a>) -> bool
fn eq(&self, other: &SetImageState<'a>) -> bool
Tests for
self and other values to be equal, and is used by ==.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> UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more