Struct ethcore_io::IoChannel
source · [−]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
sourceimpl<Message> IoChannel<Message> where
Message: Send + Sync + 'static,
impl<Message> IoChannel<Message> where
Message: Send + Sync + 'static,
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more