Struct hadean::RawSender
[−]
[src]
pub struct RawSender(_, _);
Untyped sending end of a channel, can be converted to a Sender<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 RawSender
[src]
fn open() -> Self
[src]
Wraps RawSender::with_len(DEFAULT_BUF_LEN)
fn with_len(len: usize) -> Self
[src]
Accepts a newly-spawned ChannelEndpoint::Pid
channel.
fn downcast<T: ProcessTransfer>(self) -> Sender<T>
[src]
Convert to a Sender<T>
or panic if the type cannot be verified
Will only succeed with RawSender
s from spawn()
.
fn unchecked_downcast<T: ProcessSend>(self) -> Sender<T>
[src]
Convert to a Sender<T>
without checking for the correct type.
Required for RawSender
s not from spawn()
.
fn send<T: ProcessSend>(&self, src: &T)
[src]
Send a dynamic T on a Channel. May cause the other end to panic if the
is not what the other end was expecting (see RawReceiver::receive
).
fn send_bytes(&self, bs: &[u8])
[src]
it sends bytes
fn available(&self) -> usize
[src]
Send bytes available