Struct sbp::messages::flash::msg_flash_done::MsgFlashDone
source · [−]Expand description
Flash response message (host <= device)
This message defines success or failure codes for a variety of flash memory requests from the host to the device. Flash read and write messages, such as MSG_FLASH_READ_REQ, or MSG_FLASH_PROGRAM, may return this message on failure.
Fields
sender_id: Option<u16>
The message sender_id
response: u8
Response flags
Implementations
sourceimpl MsgFlashDone
impl MsgFlashDone
sourcepub fn response_code(&self) -> Result<ResponseCode, u8>
pub fn response_code(&self) -> Result<ResponseCode, u8>
Gets the ResponseCode stored in the response
bitfield.
Returns Ok
if the bitrange contains a known ResponseCode
variant.
Otherwise the value of the bitrange is returned as an Err(u8)
. This may be because of a malformed message,
or because new variants of ResponseCode
were added.
sourcepub fn set_response_code(&mut self, response_code: ResponseCode)
pub fn set_response_code(&mut self, response_code: ResponseCode)
Set the bitrange corresponding to the ResponseCode of the response
bitfield.
Trait Implementations
sourceimpl Clone for MsgFlashDone
impl Clone for MsgFlashDone
sourcefn clone(&self) -> MsgFlashDone
fn clone(&self) -> MsgFlashDone
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ConcreteMessage for MsgFlashDone
impl ConcreteMessage for MsgFlashDone
sourceconst MESSAGE_TYPE: u16 = 224u16
const MESSAGE_TYPE: u16 = 224u16
The message type.
sourceconst MESSAGE_NAME: &'static str = "MSG_FLASH_DONE"
const MESSAGE_NAME: &'static str = "MSG_FLASH_DONE"
The message name.
sourceimpl Debug for MsgFlashDone
impl Debug for MsgFlashDone
sourceimpl From<MsgFlashDone> for Sbp
impl From<MsgFlashDone> for Sbp
sourcefn from(msg: MsgFlashDone) -> Self
fn from(msg: MsgFlashDone) -> Self
Converts to this type from the input type.
sourceimpl SbpMessage for MsgFlashDone
impl SbpMessage for MsgFlashDone
sourcefn message_name(&self) -> &'static str
fn message_name(&self) -> &'static str
Get the message name.
sourcefn message_type(&self) -> u16
fn message_type(&self) -> u16
Get the message type.
sourcefn set_sender_id(&mut self, new_id: u16)
fn set_sender_id(&mut self, new_id: u16)
Set the sender id.
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Number of bytes this message will take on the wire.
Auto Trait Implementations
impl RefUnwindSafe for MsgFlashDone
impl Send for MsgFlashDone
impl Sync for MsgFlashDone
impl Unpin for MsgFlashDone
impl UnwindSafe for MsgFlashDone
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more