pub struct IoChannel<Message>where
Message: Send,{ /* private fields */ }
Expand description
Allows sending messages into the event loop. All the IO handlers will get
the message in the message
callback.
Implementations§
source§impl<Message> IoChannel<Message>
impl<Message> IoChannel<Message>
sourcepub fn send_sync(&self, message: Message) -> Result<(), IoError>
pub fn send_sync(&self, message: Message) -> Result<(), IoError>
Send a message through the channel and handle it synchronously
sourcepub fn send_io(&self, message: IoMessage<Message>) -> Result<(), IoError>
pub fn send_io(&self, message: IoMessage<Message>) -> Result<(), IoError>
Send low level io message
sourcepub fn disconnected() -> IoChannel<Message>
pub fn disconnected() -> IoChannel<Message>
Create a new channel disconnected from an event loop.
sourcepub fn to_handler(handler: Weak<dyn IoHandler<Message>>) -> IoChannel<Message>
pub fn to_handler(handler: Weak<dyn IoHandler<Message>>) -> IoChannel<Message>
Create a new synchronous channel to a given handler.
Trait Implementations§
Auto Trait Implementations§
impl<Message> !RefUnwindSafe for IoChannel<Message>
impl<Message> Send for IoChannel<Message>where
Message: Sync,
impl<Message> Sync for IoChannel<Message>where
Message: Sync,
impl<Message> Unpin for IoChannel<Message>
impl<Message> !UnwindSafe for IoChannel<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