pub struct PingResponse {
pub version: u32,
pub options: u16,
}Expand description
McuBoot ping response packet structure
Represents the response received from a McuBoot device after sending a ping packet.
Fields§
§version: u32Bootloader version
options: u16Bootloader options
Trait Implementations§
Source§impl Clone for PingResponse
impl Clone for PingResponse
Source§fn clone(&self) -> PingResponse
fn clone(&self) -> PingResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PingResponse
impl Debug for PingResponse
Source§impl Packet for PingResponse
impl Packet for PingResponse
Source§impl PacketParse for PingResponse
impl PacketParse for PingResponse
Source§fn parse(bytes: &[u8]) -> Result<PingResponse, CommunicationError>
fn parse(bytes: &[u8]) -> Result<PingResponse, CommunicationError>
Parses raw bytes into a PingResponse packet
This method extracts the version and options information from the received ping response bytes. The parsing follows the McuBoot protocol specification for ping response packet format.
§Arguments
bytes- Raw response bytes (without protocol header)
§Returns
A Result containing the parsed PingResponse
§Packet Format
The ping response payload has the following structure:
- Bytes 0-1: Reserved/unused
- Bytes 2-5: Version (4 bytes, big-endian)
- Bytes 6-7: Options (2 bytes, little-endian)
Source§impl PartialEq for PingResponse
impl PartialEq for PingResponse
impl Copy for PingResponse
impl Eq for PingResponse
impl StructuralPartialEq for PingResponse
Auto Trait Implementations§
impl Freeze for PingResponse
impl RefUnwindSafe for PingResponse
impl Send for PingResponse
impl Sync for PingResponse
impl Unpin for PingResponse
impl UnwindSafe for PingResponse
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