pub struct LeSliceView<'a, T> { /* private fields */ }Expand description
A borrowed, alignment-agnostic view over a CDR little-endian numeric
sequence (RFC-0033 borrowed mode). Borrows the raw payload bytes
zero-copy; decodes elements lazily on access, so the source buffer need not
be T-aligned. Valid only for the borrow lifetime 'a (the subscription
callback scope).
Implementations§
Source§impl<'a, T> LeSliceView<'a, T>where
T: LeDecode,
impl<'a, T> LeSliceView<'a, T>where
T: LeDecode,
Sourcepub fn new(bytes: &'a [u8]) -> LeSliceView<'a, T>
pub fn new(bytes: &'a [u8]) -> LeSliceView<'a, T>
Wrap raw little-endian payload bytes. bytes.len() must be a multiple of
T::SIZE (guaranteed by CdrReader::read_le_slice).
Trait Implementations§
Source§impl<'a, T> Clone for LeSliceView<'a, T>where
T: Clone,
impl<'a, T> Clone for LeSliceView<'a, T>where
T: Clone,
Source§fn clone(&self) -> LeSliceView<'a, T>
fn clone(&self) -> LeSliceView<'a, T>
Returns a duplicate 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 moreimpl<'a, T> Copy for LeSliceView<'a, T>where
T: Copy,
Auto Trait Implementations§
impl<'a, T> Freeze for LeSliceView<'a, T>
impl<'a, T> RefUnwindSafe for LeSliceView<'a, T>
impl<'a, T> Send for LeSliceView<'a, T>
impl<'a, T> Sync for LeSliceView<'a, T>
impl<'a, T> Unpin for LeSliceView<'a, T>
impl<'a, T> UnsafeUnpin for LeSliceView<'a, T>
impl<'a, T> UnwindSafe for LeSliceView<'a, T>
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