Struct vapcore_io::IoService [−][src]
General IO Service. Starts an event loop and dispatches IO requests. ‘Message’ is a notification message type
Implementations
impl<Message> IoService<Message> where
Message: Send + Sync + 'static,
[src]
Message: Send + Sync + 'static,
pub fn start() -> Result<IoService<Message>, IoError>
[src]
Starts IO event loop
pub fn stop(&mut self)
[src]
Stops the IO service.
pub fn register_handler(
&self,
handler: Arc<dyn IoHandler<Message> + Send>
) -> Result<(), IoError>
[src]
&self,
handler: Arc<dyn IoHandler<Message> + Send>
) -> Result<(), IoError>
Register an IO handler with the event loop.
pub fn send_message(&self, message: Message) -> Result<(), IoError>
[src]
Send a message over the network. Normaly HostIo::send
should be used. This can be used from non-io threads.
pub fn channel(&self) -> IoChannel<Message>
[src]
Create a new message channel
Trait Implementations
Auto Trait Implementations
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
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>,