pub struct ImageState {
pub image: u32,
pub slot: u32,
pub version: String,
pub hash: Option<[u8; 32]>,
pub bootable: bool,
pub pending: bool,
pub confirmed: bool,
pub active: bool,
pub permanent: bool,
}Expand description
The state of an image slot
Fields§
§image: u32image number
slot: u32slot number within “image”
version: Stringstring representing image version, as set with imgtool
hash: Option<[u8; 32]>SHA256 hash of the image header and body
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.
bootable: booltrue if image has bootable flag set
pending: booltrue if image is set for next swap
confirmed: booltrue if image has been confirmed
active: booltrue if image is currently active application
permanent: booltrue if image is to stay in primary slot after the next boot
Trait Implementations§
Source§impl Debug for ImageState
impl Debug for ImageState
Source§impl<'de> Deserialize<'de> for ImageState
impl<'de> Deserialize<'de> for ImageState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ImageState
impl PartialEq for ImageState
Source§impl Serialize for ImageState
impl Serialize for ImageState
impl Eq for ImageState
impl StructuralPartialEq for ImageState
Auto Trait Implementations§
impl Freeze for ImageState
impl RefUnwindSafe for ImageState
impl Send for ImageState
impl Sync for ImageState
impl Unpin for ImageState
impl UnwindSafe for ImageState
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