Constructors for flat pipes that send POD types using memcpy.

Safety Note

This module is currently unsafe because it uses Copy Owned as a type parameter bounds meaning POD (plain old data), but Copy Owned and POD are not equivelant.

Type PipeChan

type PipeChan<T: Copy Owned> = FlatChan<T, PodFlattener<T>, PipeByteChan>

Type PipePort

type PipePort<T: Copy Owned> = FlatPort<T, PodUnflattener<T>, PipeBytePort>

Type ReaderPort

type ReaderPort<T: Copy Owned, R> = FlatPort<T, PodUnflattener<T>, ReaderBytePort<R>>

Type WriterChan

type WriterChan<T: Copy Owned, W> = FlatChan<T, PodFlattener<T>, WriterByteChan<W>>

Function pipe_chan

fn pipe_chan<T: Copy Owned>(chan: Chan<~[u8]>) -> PipeChan<T>

Create a FlatChan from a Chan<~[u8]>

Function pipe_port

fn pipe_port<T: Copy Owned>(port: Port<~[u8]>) -> PipePort<T>

Create a FlatPort from a Port<~[u8]>

Function pipe_stream

fn pipe_stream<T: Copy Owned>() -> (PipePort<T>, PipeChan<T>)

Create a pair of FlatChan and FlatPort, backed by pipes

Function reader_port

fn reader_port<T: Copy Owned, R: Reader>(reader: R) -> ReaderPort<T, R>

Create a FlatPort from a Reader

Function writer_chan

fn writer_chan<T: Copy Owned, W: Writer>(writer: W) -> WriterChan<T, W>

Create a FlatChan from a Writer