#[repr(u8)]pub enum DiagnosticPowerModeCode {
NotReady = 0,
Ready = 1,
NotSupported = 2,
Reserved(u8),
}Expand description
Identifies whether or not the vehicle is in diagnostic power mode and ready to perform reliable diagnostics.
Variants§
NotReady = 0
The vehicle is not currently able to perform reliable diagnostics.
Ready = 1
The vehicle is ready to perform reliable diagnostics.
NotSupported = 2
This entity does not report power mode information.
Reserved(u8)
A power mode value outside the range this crate models.
Trait Implementations§
Source§impl Clone for DiagnosticPowerModeCode
impl Clone for DiagnosticPowerModeCode
Source§fn clone(&self) -> DiagnosticPowerModeCode
fn clone(&self) -> DiagnosticPowerModeCode
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 moreimpl Copy for DiagnosticPowerModeCode
Source§impl Debug for DiagnosticPowerModeCode
impl Debug for DiagnosticPowerModeCode
Source§impl<'a> Decode<'a> for DiagnosticPowerModeCode
impl<'a> Decode<'a> for DiagnosticPowerModeCode
Source§fn decode(buf: &'a [u8]) -> Result<(Self, &'a [u8]), MessageError>
fn decode(buf: &'a [u8]) -> Result<(Self, &'a [u8]), MessageError>
Deserialize a diagnostic power mode code from a byte slice
§Errors
Returns MessageError::Incomplete if buf is too short
Source§type Error = MessageError
type Error = MessageError
Per-implementation error; constructible from
Incomplete and TrailingBytes
so the fixed-width leaf read helpers (read_u8, read_u16_be,
read_array, …) and the decode_exact default lift through ?. Read moreSource§impl Encode for DiagnosticPowerModeCode
impl Encode for DiagnosticPowerModeCode
Source§fn encode(&self, writer: &mut impl Write) -> Result<usize, MessageError>
fn encode(&self, writer: &mut impl Write) -> Result<usize, MessageError>
Serialize this diagnostic power mode code into writer
§Errors
Returns MessageError::Io if the writer fails.
Source§type Error = MessageError
type Error = MessageError
Per-implementation error; constructible from an I/O
embedded_io::ErrorKind
so the fixed-width write_* leaf helpers lift through ?. Read moreSource§fn encoded_size(&self) -> Result<usize, MessageError>
fn encoded_size(&self) -> Result<usize, MessageError>
Source§fn encode_to_slice(
&self,
buf: &mut [u8],
) -> Result<usize, EncodeToSliceError<Self::Error>>
fn encode_to_slice( &self, buf: &mut [u8], ) -> Result<usize, EncodeToSliceError<Self::Error>>
Encode into a fixed slice, reporting
needed/available
(InsufficientBuffer) instead of a bare
embedded_io::ErrorKind::WriteZero when the slice is too small, and
hiding the &mut &mut [u8] cursor re-borrow every fixed-buffer call
site otherwise writes by hand. Read moreimpl Eq for DiagnosticPowerModeCode
Source§impl From<DiagnosticPowerModeCode> for u8
impl From<DiagnosticPowerModeCode> for u8
Source§fn from(value: DiagnosticPowerModeCode) -> Self
fn from(value: DiagnosticPowerModeCode) -> Self
Converts to this type from the input type.
Source§impl From<u8> for DiagnosticPowerModeCode
impl From<u8> for DiagnosticPowerModeCode
Source§impl PartialEq for DiagnosticPowerModeCode
impl PartialEq for DiagnosticPowerModeCode
impl StructuralPartialEq for DiagnosticPowerModeCode
Auto Trait Implementations§
impl Freeze for DiagnosticPowerModeCode
impl RefUnwindSafe for DiagnosticPowerModeCode
impl Send for DiagnosticPowerModeCode
impl Sync for DiagnosticPowerModeCode
impl Unpin for DiagnosticPowerModeCode
impl UnsafeUnpin for DiagnosticPowerModeCode
impl UnwindSafe for DiagnosticPowerModeCode
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