pub struct IoService<Message>{ /* private fields */ }
Expand description
General IO Service. Starts an event loop and dispatches IO requests. ‘Message’ is a notification message type
Implementations§
Source§impl<Message> IoService<Message>
impl<Message> IoService<Message>
Sourcepub fn register_handler(
&self,
handler: Arc<dyn IoHandler<Message> + Send>,
) -> Result<(), IoError>
pub fn register_handler( &self, handler: Arc<dyn IoHandler<Message> + Send>, ) -> Result<(), IoError>
Register an IO handler with the event loop.
Sourcepub fn send_message(&self, message: Message) -> Result<(), IoError>
pub fn send_message(&self, message: Message) -> Result<(), IoError>
Send a message over the network. Normaly HostIo::send
should be used. This can be used from non-io threads.
Trait Implementations§
Auto Trait Implementations§
impl<Message> !Freeze for IoService<Message>
impl<Message> !RefUnwindSafe for IoService<Message>
impl<Message> Send for IoService<Message>
impl<Message> Sync for IoService<Message>
impl<Message> Unpin for IoService<Message>
impl<Message> !UnwindSafe for IoService<Message>
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