Enum automotive_diag::ByteWrapper
source · pub enum ByteWrapper<T> {
Standard(T),
Extended(u8),
}
Expand description
A wrapper around a byte, which can be either an ISO-standardized value for a specific enum,
or an implementation-specific/invalid Extended
value wrapping original byte.
Variants§
Implementations§
source§impl ByteWrapper<Obd2Error>
impl ByteWrapper<Obd2Error>
FIXME: it seems there are more than one value for ServiceNotSupportedInActiveSession
condition,
so for now we just have a test here. In the future, it should be clarified as individual constants above.
sourcepub fn is_not_supported(&self) -> bool
pub fn is_not_supported(&self) -> bool
Returns true if the error is one of the well known “not supported” errors
Trait Implementations§
source§impl<T: Clone> Clone for ByteWrapper<T>
impl<T: Clone> Clone for ByteWrapper<T>
source§fn clone(&self) -> ByteWrapper<T>
fn clone(&self) -> ByteWrapper<T>
Returns a copy 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<T: Debug> Debug for ByteWrapper<T>
impl<T: Debug> Debug for ByteWrapper<T>
source§impl<T: Into<u8>> From<ByteWrapper<T>> for u8
impl<T: Into<u8>> From<ByteWrapper<T>> for u8
source§fn from(value: ByteWrapper<T>) -> Self
fn from(value: ByteWrapper<T>) -> Self
Converts to this type from the input type.
source§impl<T: Ord> Ord for ByteWrapper<T>
impl<T: Ord> Ord for ByteWrapper<T>
source§fn cmp(&self, other: &ByteWrapper<T>) -> Ordering
fn cmp(&self, other: &ByteWrapper<T>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq<ByteWrapper<T>> for ByteWrapper<T>
impl<T: PartialEq> PartialEq<ByteWrapper<T>> for ByteWrapper<T>
source§fn eq(&self, other: &ByteWrapper<T>) -> bool
fn eq(&self, other: &ByteWrapper<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: PartialOrd> PartialOrd<ByteWrapper<T>> for ByteWrapper<T>
impl<T: PartialOrd> PartialOrd<ByteWrapper<T>> for ByteWrapper<T>
source§fn partial_cmp(&self, other: &ByteWrapper<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &ByteWrapper<T>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more