Struct std::old_io::ChanWriterUnstable
[-] [+]
[src]
pub struct ChanWriter { // some fields omitted }
Allows writing to a tx.
Example
fn main() { #![allow(unused_must_use)] use std::sync::mpsc::channel; use std::old_io::ChanWriter; let (tx, rx) = channel(); drop(rx); let mut writer = ChanWriter::new(tx); writer.write("hello, world".as_bytes()); }use std::sync::mpsc::channel; use std::old_io::ChanWriter; let (tx, rx) = channel(); let mut writer = ChanWriter::new(tx); writer.write("hello, world".as_bytes());
Methods
impl ChanWriter
fn new(tx: Sender<Vec<u8>>) -> ChanWriter
Wraps a channel in a ChanWriter
structure