pub struct TcpEventQueue { /* private fields */ }Implementations§
Source§impl TcpEventQueue
impl TcpEventQueue
Sourcepub fn register_callback(
&self,
at: TcpEvent,
callback: Box<dyn FnOnce(TcpEventData<'_>)>,
)
pub fn register_callback( &self, at: TcpEvent, callback: Box<dyn FnOnce(TcpEventData<'_>)>, )
Registers a new callback to be triggered when an event is fired.
Sourcepub fn register_subscriber(
&self,
at: TcpEvent,
callback: Box<dyn FnMut(TcpEventData<'_>) -> bool>,
)
pub fn register_subscriber( &self, at: TcpEvent, callback: Box<dyn FnMut(TcpEventData<'_>) -> bool>, )
Registers a new callback to be triggered when an event is fired.
Sourcepub fn resolve(&self, data: TcpEventData<'_>)
pub fn resolve(&self, data: TcpEventData<'_>)
Fires all callbacks related to a specific TCP event and removes them from the event queue. Also calls all event subscribers, but keeps them in the queue
Trait Implementations§
Source§impl Clone for TcpEventQueue
impl Clone for TcpEventQueue
Source§fn clone(&self) -> TcpEventQueue
fn clone(&self) -> TcpEventQueue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TcpEventQueue
impl Debug for TcpEventQueue
Source§impl Default for TcpEventQueue
impl Default for TcpEventQueue
Source§fn default() -> TcpEventQueue
fn default() -> TcpEventQueue
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TcpEventQueue
impl RefUnwindSafe for TcpEventQueue
impl !Send for TcpEventQueue
impl !Sync for TcpEventQueue
impl Unpin for TcpEventQueue
impl UnwindSafe for TcpEventQueue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more