Struct std::comm::SharedPort

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

Methods

impl<T: Send> SharedPort<T>

fn new(p: Port<T>) -> SharedPort<T>

Trait Implementations

impl<T: Send> GenericPort<T> for SharedPort<T>

fn recv(&self) -> T

Receives a message, or fails if the connection closes.

fn try_recv(&self) -> Option<T>

Receives a message, or returns none if the connection is closed or closes.

impl<T> Clone for SharedPort<T>

fn clone(&self) -> SharedPort<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.