TransferDataResponse

Struct TransferDataResponse 

Source
#[non_exhaustive]
pub struct TransferDataResponse { pub block_sequence_counter: u8, pub data: Vec<u8>, }

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.
§block_sequence_counter: u8

Starts at 0x01 from the server when a RequestDownload or RequestUpload or RequestFileTransfer is received Increments by 0x01 for each TransferDataRequest message At 0xFF the counter wraps around to 0x00

This is an ECHO of the block_sequence_counter from the TransferDataRequest message Check against the request to ensure the correct block is being acknowledged If the block_sequence_counter is not as expected or does not arrive, the client should retransmit the block

§data: Vec<u8>

Contains data required by the client to support the transfer of data. Vehicle manufacturer specific

For download (client to server), this might be a checksum for the client to verify correct transfer This should not repeat the data sent from the client For upload (server to client), this will include the data from the server

Trait Implementations§

Source§

impl Clone for TransferDataResponse

Source§

fn clone(&self) -> TransferDataResponse

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 ComposeSchema for TransferDataResponse

Source§

impl Debug for TransferDataResponse

Source§

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

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

impl<'de> Deserialize<'de> for TransferDataResponse

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 PartialEq for TransferDataResponse

Source§

fn eq(&self, other: &TransferDataResponse) -> 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 Serialize for TransferDataResponse

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 SingleValueWireFormat for TransferDataResponse

Source§

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

Errors Read more
Source§

impl ToSchema for TransferDataResponse

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 WireFormat for TransferDataResponse

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 required_size(&self) -> usize

Returns the number of bytes required to serialize this value.
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 StructuralPartialEq for TransferDataResponse

Auto Trait Implementations§

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>,