pub struct PortRxHub { /* private fields */ }Expand description
Single RX consumer on the main serial fd (desktop).
Implementations§
Source§impl PortRxHub
impl PortRxHub
pub fn start(port: Arc<Mutex<Box<dyn SerialPort>>>, path: String) -> Self
pub fn is_finished(&self) -> bool
pub fn attach_watch_with( &self, channel: EventSink, batch_timeout_ms: u64, read_size: usize, route_urc: bool, framer: Option<Box<dyn Framer>>, )
pub fn detach_watch(&self)
pub fn set_exchange_waiter(&self, waiter: Arc<ExchangeWaiter>)
pub fn clear_exchange_waiter(&self)
pub fn cancel_active_exchange(&self)
pub fn attach_cmux(&self, session: Arc<CmuxSession>)
pub fn detach_cmux(&self)
Sourcepub fn drain(
&self,
idle_ms: u64,
max_ms: u64,
cancel: Arc<AtomicBool>,
solicited_prefixes: Vec<String>,
) -> Result<Vec<u8>, String>
pub fn drain( &self, idle_ms: u64, max_ms: u64, cancel: Arc<AtomicBool>, solicited_prefixes: Vec<String>, ) -> Result<Vec<u8>, String>
Soft-drain via the hub thread (single reader); URC lines are emitted on the watch channel.
pub fn request_stop(&self)
Trait Implementations§
Source§impl RxHubHandle for PortRxHub
impl RxHubHandle for PortRxHub
fn set_exchange_waiter(&self, waiter: Arc<ExchangeWaiter>)
fn clear_exchange_waiter(&self)
fn cancel_active_exchange(&self)
fn attach_watch_with( &self, channel: EventSink, batch_timeout_ms: u64, read_size: usize, route_urc: bool, framer: Option<Box<dyn Framer>>, )
fn detach_watch(&self)
fn attach_cmux(&self, session: Arc<CmuxSession>)
fn detach_cmux(&self)
Source§fn shutdown_hub(&self)
fn shutdown_hub(&self)
Stop background RX processing.
Auto Trait Implementations§
impl !Freeze for PortRxHub
impl Forget for PortRxHub
impl Move for PortRxHub
impl RefUnwindSafe for PortRxHub
impl Send for PortRxHub
impl Sync for PortRxHub
impl Unpin for PortRxHub
impl UnsafeUnpin for PortRxHub
impl UnwindSafe for PortRxHub
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