pub struct U3vEventStream { /* private fields */ }Expand description
The events a device sends, read from its event endpoint with a few event commands’ transfers queued.
Implementations§
Source§impl U3vEventStream
impl U3vEventStream
Sourcepub fn new(
queue: Box<dyn BulkIn>,
max_transfer: u32,
packet: Option<usize>,
) -> Self
pub fn new( queue: Box<dyn BulkIn>, max_transfer: u32, packet: Option<usize>, ) -> Self
Events from queue, each command at most max_transfer bytes (the
EIRM’s Maximum Event Transfer Length; 1024 when it says 0), every
transfer a whole number of packet-byte packets.
Sourcepub fn next_event_within(
&mut self,
idle: Duration,
) -> Result<Option<U3vEvent>, U3vError>
pub fn next_event_within( &mut self, idle: Duration, ) -> Result<Option<U3vEvent>, U3vError>
The next event, or Ok(None) when none arrived within idle. A
failed transfer resets the endpoint and the stream goes on;
U3vError::Disconnected, or transfers that keep failing, end it.
Auto Trait Implementations§
impl !RefUnwindSafe for U3vEventStream
impl !Sync for U3vEventStream
impl !UnwindSafe for U3vEventStream
impl Freeze for U3vEventStream
impl Send for U3vEventStream
impl Unpin for U3vEventStream
impl UnsafeUnpin for U3vEventStream
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