Struct vapcore_io::IoContext [−][src]
IO access point. This is passed to all IO handlers and provides an interface to the IO subsystem.
Implementations
impl<Message> IoContext<Message> where
Message: Send + Sync + 'static,
[src]
Message: Send + Sync + 'static,
pub fn register_timer(
&self,
token: TimerToken,
delay: Duration
) -> Result<(), IoError>
[src]
&self,
token: TimerToken,
delay: Duration
) -> Result<(), IoError>
Register a new recurring IO timer. ‘IoHandler::timeout’ will be called with the token.
pub fn register_timer_once(
&self,
token: TimerToken,
delay: Duration
) -> Result<(), IoError>
[src]
&self,
token: TimerToken,
delay: Duration
) -> Result<(), IoError>
Register a new IO timer once. ‘IoHandler::timeout’ will be called with the token.
pub fn clear_timer(&self, token: TimerToken) -> Result<(), IoError>
[src]
Delete a timer.
pub fn message(&self, message: Message) -> Result<(), IoError>
[src]
Broadcast a message to other IO clients
pub fn channel(&self) -> IoChannel<Message>
[src]
Get message channel
pub fn unregister_handler(&self) -> Result<(), IoError>
[src]
Unregister current IO handler.
Auto Trait Implementations
impl<Message> !RefUnwindSafe for IoContext<Message>
impl<Message> Send for IoContext<Message>
impl<Message> Sync for IoContext<Message>
impl<Message> Unpin for IoContext<Message>
impl<Message> !UnwindSafe for IoContext<Message>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,