pub struct DiagnosticsResponse<'buf> {
pub sub_function: DiagnosticSubFunction,
pub data: &'buf [u8],
}Expand description
Response to a Diagnostics request (FC 0x08).
Echoes the sub-function code and associated data.
Fields§
§sub_function: DiagnosticSubFunctionThe diagnostic sub-function code.
data: &'buf [u8]Diagnostic data bytes.
Implementations§
Source§impl<'buf> DiagnosticsResponse<'buf>
impl<'buf> DiagnosticsResponse<'buf>
Trait Implementations§
Source§impl<'buf> Debug for DiagnosticsResponse<'buf>
impl<'buf> Debug for DiagnosticsResponse<'buf>
Source§impl Encode for DiagnosticsResponse<'_>
impl Encode for DiagnosticsResponse<'_>
Source§fn encode_into(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
fn encode_into(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
Write the full PDU (function code + data) into
buf. Read moreSource§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Total encoded length in bytes (including the function code byte).
Auto Trait Implementations§
impl<'buf> Freeze for DiagnosticsResponse<'buf>
impl<'buf> RefUnwindSafe for DiagnosticsResponse<'buf>
impl<'buf> Send for DiagnosticsResponse<'buf>
impl<'buf> Sync for DiagnosticsResponse<'buf>
impl<'buf> Unpin for DiagnosticsResponse<'buf>
impl<'buf> UnsafeUnpin for DiagnosticsResponse<'buf>
impl<'buf> UnwindSafe for DiagnosticsResponse<'buf>
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