Struct handy_io::pattern::read::Until [] [src]

pub struct Until<F, T> { /* fields omitted */ }

A pattern which continues reading until the predicate F is satisfied.

Methods

impl<F, T> Until<F, T>
[src]

Sets minimum (i.e., initial) buffer size.

Sets maiximum buffer size allowed to read.

Trait Implementations

impl<R: Read, F, T> ReadFrom<R> for Until<F, T> where
    F: Fn(&[u8], bool) -> Result<Option<T>>, 
[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<F: Debug, T: Debug> Debug for Until<F, T>
[src]

Formats the value using the given formatter.

impl<F, T> Pattern for Until<F, T>
[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.