pub struct ReadFileRecordRequest<'buf> {
pub byte_count: u8,
pub sub_requests: &'buf [u8],
}Expand description
FC 0x14 — Read File Record request.
Contains one or more 7-byte sub-request records packed in sub_requests.
Fields§
§byte_count: u8Total byte count of the sub-request data that follows.
sub_requests: &'buf [u8]Raw sub-request data (each sub-request is 7 bytes).
Implementations§
Source§impl<'buf> ReadFileRecordRequest<'buf>
impl<'buf> ReadFileRecordRequest<'buf>
Sourcepub fn decode(data: &'buf [u8]) -> Result<Self, DecodeError>
pub fn decode(data: &'buf [u8]) -> Result<Self, DecodeError>
Decode from PDU data after the function code byte.
§Errors
Returns DecodeError::Truncated if data is too short.
Returns DecodeError::ByteCountMismatch if the declared byte count does not
match the remaining data length.
Trait Implementations§
Source§impl<'buf> Clone for ReadFileRecordRequest<'buf>
impl<'buf> Clone for ReadFileRecordRequest<'buf>
Source§fn clone(&self) -> ReadFileRecordRequest<'buf>
fn clone(&self) -> ReadFileRecordRequest<'buf>
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<'buf> Copy for ReadFileRecordRequest<'buf>
Source§impl<'buf> Debug for ReadFileRecordRequest<'buf>
impl<'buf> Debug for ReadFileRecordRequest<'buf>
Source§impl Encode for ReadFileRecordRequest<'_>
impl Encode for ReadFileRecordRequest<'_>
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).
impl<'buf> Eq for ReadFileRecordRequest<'buf>
Source§impl<'buf> PartialEq for ReadFileRecordRequest<'buf>
impl<'buf> PartialEq for ReadFileRecordRequest<'buf>
Source§fn eq(&self, other: &ReadFileRecordRequest<'buf>) -> bool
fn eq(&self, other: &ReadFileRecordRequest<'buf>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<'buf> StructuralPartialEq for ReadFileRecordRequest<'buf>
Auto Trait Implementations§
impl<'buf> Freeze for ReadFileRecordRequest<'buf>
impl<'buf> RefUnwindSafe for ReadFileRecordRequest<'buf>
impl<'buf> Send for ReadFileRecordRequest<'buf>
impl<'buf> Sync for ReadFileRecordRequest<'buf>
impl<'buf> Unpin for ReadFileRecordRequest<'buf>
impl<'buf> UnsafeUnpin for ReadFileRecordRequest<'buf>
impl<'buf> UnwindSafe for ReadFileRecordRequest<'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