RoutineControlResponse

Struct RoutineControlResponse 

Source
#[non_exhaustive]
pub struct RoutineControlResponse<RoutineInfoStatusRecord> { pub routine_control_type: RoutineControlSubFunction, pub routine_status_record: RoutineInfoStatusRecord, }
Expand description

RoutineControlResponse is a variable length field that can contain the status of the routine

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§routine_control_type: RoutineControlSubFunction

The sub-function echoes the routine control request

§routine_status_record: RoutineInfoStatusRecord

Should contain the routine_info (u8) and the routine_status_record (u8 * n) information. n can be 0

routine_info: The routine information that the response is for (vehicle manufacturer specific) routine_status_record: The status of the routine (optional)

Mandatory for any routine where the routine_status_record is defined by ISO/SAE specs, even if it is 0 bytes. Optional if the routine is defined by a manufacturer.

Implementations§

Source§

impl<RoutineStatusRecord: WireFormat> RoutineControlResponse<RoutineStatusRecord>

Source

pub fn status_record_data(&self) -> Result<Vec<u8>, Error>

Get the raw data of the status record

§Errors
  • if the stream is not in the expected format
  • if the stream contains partial data

Trait Implementations§

Source§

impl<RoutineInfoStatusRecord: Clone> Clone for RoutineControlResponse<RoutineInfoStatusRecord>

Source§

fn clone(&self) -> RoutineControlResponse<RoutineInfoStatusRecord>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<RoutineInfoStatusRecord> ComposeSchema for RoutineControlResponse<RoutineInfoStatusRecord>
where RoutineInfoStatusRecord: ToSchema,

Source§

impl<RoutineInfoStatusRecord: Debug> Debug for RoutineControlResponse<RoutineInfoStatusRecord>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, RoutineInfoStatusRecord> Deserialize<'de> for RoutineControlResponse<RoutineInfoStatusRecord>
where RoutineInfoStatusRecord: Deserialize<'de>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<RoutineInfoStatusRecord: PartialEq> PartialEq for RoutineControlResponse<RoutineInfoStatusRecord>

Source§

fn eq(&self, other: &RoutineControlResponse<RoutineInfoStatusRecord>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<RoutineInfoStatusRecord> Serialize for RoutineControlResponse<RoutineInfoStatusRecord>
where RoutineInfoStatusRecord: Serialize,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<RoutineStatusRecord: WireFormat> SingleValueWireFormat for RoutineControlResponse<RoutineStatusRecord>

Source§

fn from_reader<T: Read>(reader: &mut T) -> Result<Self, Error>

Errors Read more
Source§

impl<RoutineInfoStatusRecord> ToSchema for RoutineControlResponse<RoutineInfoStatusRecord>
where RoutineInfoStatusRecord: ToSchema,

Source§

fn name() -> Cow<'static, str>

Return name of the schema. Read more
Source§

fn schemas(schemas: &mut Vec<(String, RefOr<Schema>)>)

Implement reference utoipa::openapi::schema::Schemas for this type. Read more
Source§

impl<RoutineStatusRecord: WireFormat> WireFormat for RoutineControlResponse<RoutineStatusRecord>

Source§

fn required_size(&self) -> usize

Can be 3 bytes, or more

Source§

fn option_from_reader<T: Read>(reader: &mut T) -> Result<Option<Self>, Error>

Deserialize a value from a byte stream. Returns Ok(Some(value)) if the stream contains a complete value. Returns Ok(None) if the stream is empty. Read more
Source§

fn to_writer<T: Write>(&self, writer: &mut T) -> Result<usize, Error>

Serialize a value to a byte stream. Returns the number of bytes written. Read more
Source§

fn is_positive_response_suppressed(&self) -> bool

For some UDS messages, positive replies can be suppressed via the SPRMIB (bit 7 position) of the request. Read more
Source§

impl<RoutineInfoStatusRecord> StructuralPartialEq for RoutineControlResponse<RoutineInfoStatusRecord>

Auto Trait Implementations§

§

impl<RoutineInfoStatusRecord> Freeze for RoutineControlResponse<RoutineInfoStatusRecord>
where RoutineInfoStatusRecord: Freeze,

§

impl<RoutineInfoStatusRecord> RefUnwindSafe for RoutineControlResponse<RoutineInfoStatusRecord>
where RoutineInfoStatusRecord: RefUnwindSafe,

§

impl<RoutineInfoStatusRecord> Send for RoutineControlResponse<RoutineInfoStatusRecord>
where RoutineInfoStatusRecord: Send,

§

impl<RoutineInfoStatusRecord> Sync for RoutineControlResponse<RoutineInfoStatusRecord>
where RoutineInfoStatusRecord: Sync,

§

impl<RoutineInfoStatusRecord> Unpin for RoutineControlResponse<RoutineInfoStatusRecord>
where RoutineInfoStatusRecord: Unpin,

§

impl<RoutineInfoStatusRecord> UnwindSafe for RoutineControlResponse<RoutineInfoStatusRecord>
where RoutineInfoStatusRecord: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PartialSchema for T
where T: ComposeSchema + ?Sized,

Source§

fn schema() -> RefOr<Schema>

Return ref or schema of implementing type that can then be used to construct combined schemas.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,