Struct links_nonblocking::connect::poll::PollHandler
source · pub struct PollHandler<R: PollRead, A: PollAccept<R>> { /* private fields */ }Expand description
A wrapper struct to that will use a designated thread to handle TransmittingSvcAcceptor or TransmittingSvcAcceptorRef events and resulting respective CltRecver & CltRecverRef instances
Implementations§
source§impl<R: PollRead, A: PollAccept<R>> PollHandler<R, A>
impl<R: PollRead, A: PollAccept<R>> PollHandler<R, A>
sourcepub fn with_events_capacity(capacity: usize) -> Self
pub fn with_events_capacity(capacity: usize) -> Self
Create a new PollHandler with a given capacity of Events on a single poll call
sourcepub fn add_acceptor(&mut self, acceptor: A)
pub fn add_acceptor(&mut self, acceptor: A)
Add a TransmittingSvcAcceptor or TransmittingSvcAcceptorRef to the PollHandler to be polled for incoming connections. All resulting connections in the form of CltRecver will also be serviced by this PollHandler instance.
pub fn add_recver(&mut self, recver: R)
sourcepub fn into_spawned_handler(self, name: &str) -> SpawnedPollHandler<R, A>
pub fn into_spawned_handler(self, name: &str) -> SpawnedPollHandler<R, A>
Spawns a new thread with a given name that will continuously poll for events of TransmittingSvcAcceptor or TransmittingSvcAcceptorRef and resulting CltRecvers instances
Trait Implementations§
source§impl<R: PollRead, A: PollAccept<R>> Default for PollHandler<R, A>
impl<R: PollRead, A: PollAccept<R>> Default for PollHandler<R, A>
Auto Trait Implementations§
impl<R, A> RefUnwindSafe for PollHandler<R, A>where
A: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, A> Send for PollHandler<R, A>
impl<R, A> Sync for PollHandler<R, A>
impl<R, A> Unpin for PollHandler<R, A>
impl<R, A> UnwindSafe for PollHandler<R, A>where
A: UnwindSafe,
R: UnwindSafe,
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