Struct lunatic::channel::Sender [−][src]
The sending side of a channel.
Senders can be cloned and shared among processes. When all senders associated with a channel are dropped, the channel becomes closed.
Implementations
impl<T> Sender<T> where
T: Serialize + DeserializeOwned,
[src]
T: Serialize + DeserializeOwned,
pub fn send(&self, value: T) -> Result<(), ()>
[src]
Sends a message into the channel.
If the channel is full, this method waits until there is space for a message.
If the channel is closed, this method returns an error.
Trait Implementations
impl<T> Clone for Sender<T>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de, T> Deserialize<'de> for Sender<T> where
T: Serialize + DeserializeOwned,
[src]
T: Serialize + DeserializeOwned,
fn deserialize<D>(deserializer: D) -> Result<Sender<T>, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl<T> Serialize for Sender<T> where
T: Serialize + DeserializeOwned,
[src]
T: Serialize + DeserializeOwned,
Auto Trait Implementations
impl<T> !RefUnwindSafe for Sender<T>
[src]
impl<T> !Send for Sender<T>
[src]
impl<T> !Sync for Sender<T>
[src]
impl<T> Unpin for Sender<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for Sender<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,