Struct std::comm::SharedChan

pub struct SharedChan<T> {
    x: SharedChan<T>,
}

Methods

impl<T: Send> SharedChan<T>

fn new(c: Chan<T>) -> SharedChan<T>

Trait Implementations

impl<T: Send> GenericChan<T> for SharedChan<T>

fn send(&self, val: T)

Sends a message.

impl<T: Send> GenericSmartChan<T> for SharedChan<T>

fn try_send(&self, val: T) -> bool

Sends a message, or report if the receiver has closed the connection.

impl<T: Send> SendDeferred<T> for SharedChan<T>

fn send_deferred(&self, val: T)

fn try_send_deferred(&self, val: T) -> bool

impl<T> Clone for SharedChan<T>

fn clone(&self) -> SharedChan<T>

Returns a copy of the value. The contents of owned pointers are copied to maintain uniqueness, while the contents of managed pointers are not copied.