Struct tuirealm::listener::EventListenerCfg
source · pub struct EventListenerCfg<U>{ /* private fields */ }
Expand description
The event listener configurator is used to setup an event listener.
Once you’re done with configuration just call start()
and the event listener will start and the listener
will be returned.
Implementations§
source§impl<U> EventListenerCfg<U>
impl<U> EventListenerCfg<U>
sourcepub fn poll_timeout(self, timeout: Duration) -> Self
pub fn poll_timeout(self, timeout: Duration) -> Self
Set poll timeout. Poll timeout is the maximum time to wait when fetching the thread receiver.
Panics if timeout is 0
sourcepub fn tick_interval(self, interval: Duration) -> Self
pub fn tick_interval(self, interval: Duration) -> Self
Defines the tick interval for the event listener.
If an interval is defined, this will also enable the Tick
event.
sourcepub fn port(self, poll: Box<dyn Poll<U>>, interval: Duration) -> Self
pub fn port(self, poll: Box<dyn Poll<U>>, interval: Duration) -> Self
Add a new Port (Poll, Interval) to the the event listener
sourcepub fn default_input_listener(self, interval: Duration) -> Self
pub fn default_input_listener(self, interval: Duration) -> Self
Add to the event listener the default input event listener for the backend configured.
Trait Implementations§
Auto Trait Implementations§
impl<U> !RefUnwindSafe for EventListenerCfg<U>
impl<U> Send for EventListenerCfg<U>
impl<U> !Sync for EventListenerCfg<U>
impl<U> Unpin for EventListenerCfg<U>
impl<U> !UnwindSafe for EventListenerCfg<U>
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