pub struct SegmentReader<const N: usize> { /* private fields */ }Expand description
Reassembles SDO upload data segments into a bounded buffer of capacity N,
tracking and validating the toggle bit. Push each decoded Segment until
SegmentReader::is_done, then read SegmentReader::data.
Implementations§
Source§impl<const N: usize> SegmentReader<N>
impl<const N: usize> SegmentReader<N>
Sourcepub fn push(&mut self, segment: &Segment<'_>) -> Result<()>
pub fn push(&mut self, segment: &Segment<'_>) -> Result<()>
Append a decoded segment.
Returns Error::ToggleMismatch if the segment’s toggle bit is out of
sequence, Error::UnexpectedCommand if the transfer is already
complete, or Error::Overflow if the data exceeds capacity N.
Trait Implementations§
Source§impl<const N: usize> Debug for SegmentReader<N>
impl<const N: usize> Debug for SegmentReader<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for SegmentReader<N>
impl<const N: usize> RefUnwindSafe for SegmentReader<N>
impl<const N: usize> Send for SegmentReader<N>
impl<const N: usize> Sync for SegmentReader<N>
impl<const N: usize> Unpin for SegmentReader<N>
impl<const N: usize> UnsafeUnpin for SegmentReader<N>
impl<const N: usize> UnwindSafe for SegmentReader<N>
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