Struct handy_io::pattern::Buf [] [src]

pub struct Buf<B>(pub B);

A pattern which represents byte oriented buffer like values.

Trait Implementations

impl<R: Read, B: AsMut<[u8]>> ReadFrom<R> for Buf<B>
[src]

The future to read a value of the pattern from R.

Creates a future instance to read a value of the pattern from reader.

Creates a future instance to read a value of the pattern from reader. Read more

Scynchronously reading a value of the pattern from reader. Read more

Returns the boxed version of this pattern.

impl<W: Write, B: AsRef<[u8]>> WriteTo<W> for Buf<B>
[src]

The future to write a value of the pattern to W.

Creates a future instance to write a value of the pattern to writer.

Creates a future instance to write a value of the pattern to writer. Read more

Scynchronously writing a value of the pattern to writer. Read more

Returns the boxed version of this pattern.

impl<B: Debug> Debug for Buf<B>
[src]

Formats the value using the given formatter.

impl<B: Clone> Clone for Buf<B>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<B> AllowPartial for Buf<B>
[src]

Indicates that this pattern is partially evaluable.

impl<B: AsRef<[u8]>> AsRef<[u8]> for Buf<B>
[src]

Performs the conversion.

impl<B: AsMut<[u8]>> AsMut<[u8]> for Buf<B>
[src]

Performs the conversion.

impl<B> Pattern for Buf<B>
[src]

The value type associated to the pattern.

Takes a closure which maps a Result<Self::Value> to a pattern, and creates a pattern which calls that closure on the evaluation result of self. Read more

Takes a closure which maps a value to a pattern, and creates a pattern which calls that closure if the evaluation of self was succeeded. Read more

Takes a closure which maps an error to a pattern, and creates a pattern which calls that closure if the evaluation of self failed. Read more

Takes a closure which maps a value to another value, and creates a pattern which calls that closure on the evaluated value of self. Read more

Takes two patterns and creates a new pattern over both in sequence. Read more

Creates Repeat pattern to represent an infinite stream of this pattern.