Struct hadean::RawReceiver
[−]
[src]
pub struct RawReceiver(_, _);
Untyped receiving end of a channel, can be converted to a Receiver<T>
.
Either returned by spawn()
, given to a newly-spawned worker in its arguments, or
opened by the user to accept a newly-spawned ChannelEndpoint::Pid
channel end.
Methods
impl RawReceiver
[src]
fn open() -> Self
[src]
Wraps RawReceiver::with_len(DEFAULT_BUF_LEN)
fn with_len(len: usize) -> Self
[src]
Accepts a newly-spawned ChannelEndpoint::Pid
channel.
fn downcast<T: ProcessTransfer>(self) -> Receiver<T>
[src]
Convert to a Receiver<T>
or panic if the type cannot be verified.
Will only succeed with RawReceiver
s from spawn()
.
fn unchecked_downcast<T: ProcessReceive>(self) -> Receiver<T>
[src]
Convert to a Receiver<T>
without checking for the correct type.
Required for RawReceiver
s not from spawn()
.
fn recv<T: ProcessReceive>(&self) -> T
[src]
Receive a dynamic T on a Channel. May panic if the data read does not
form a valid T (e.g. a u8
equal to 5 would fail if received as a bool).
fn recv_bytes(&self, bs: &mut [u8])
[src]
Receives bytes into bs
until it is fully populated.
fn available(&self) -> usize
[src]
Receive bytes available