Struct calloop::channel::SyncSender[][src]

pub struct SyncSender<T> { /* fields omitted */ }
Expand description

The sender end of a synchronous channel

It can be cloned and sent accross threads (if T is).

Implementations

Send a message to the synchronous channel

This will wake the event loop and deliver an Event::Msg to it containing the provided value. If the channel is full, this function will block until the event loop empties it and it can deliver the message.

Due to the blocking behavior, this method should not be used on the same thread as the one running the event loop, as it could cause deadlocks.

Send a message to the synchronous channel

This will wake the event loop and deliver an Event::Msg to it containing the provided value. If the channel is full, this function will return an error, but the event loop will still be signaled for readiness.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.