pub struct Reader { /* private fields */ }Expand description
Background reader that continuously parses frames from a device
Implementations§
Source§impl Reader
impl Reader
Sourcepub fn start(
running: Arc<AtomicBool>,
device: impl Device + Send + 'static,
) -> (Self, Receiver<DSUFrame>)
pub fn start( running: Arc<AtomicBool>, device: impl Device + Send + 'static, ) -> (Self, Receiver<DSUFrame>)
Spawn a thread that reads from device and sends parsed frames over the returned channel.
Returns immediately, use Reader::join to join the reader thread.
Returns Self and a mpsc Receiver for the UDP server
Auto Trait Implementations§
impl Freeze for Reader
impl !RefUnwindSafe for Reader
impl Send for Reader
impl Sync for Reader
impl Unpin for Reader
impl UnsafeUnpin for Reader
impl !UnwindSafe for Reader
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