Struct whiteread::white::SkipAll [] [src]

pub struct SkipAll;

Used to ignore everything till the end of the reader

Using this should be only necessary in conjuction with parse_line and parse_string, to avoid the Leftovers error. When using Reader, you can just use start_line or parse instead.

Examples

Providing type hint

let (s, x, _): (String, i32, SkipAll) = parse_string("foo 5 ... ... ...").unwrap();
assert_eq!((s, x), ("foo".to_owned(), 5));

Relying on type inference (for some reason, {} are mandatory)

let (s, x, SkipAll{}) = parse_string("foo 5").unwrap();
let x: i32 = x;
let s: String = s;
assert_eq!((s, x), ("foo".to_owned(), 5));

Trait Implementations

impl Default for SkipAll
[src]

Returns the "default value" for a type. Read more

impl Debug for SkipAll
[src]

Formats the value using the given formatter.

impl Eq for SkipAll
[src]

impl PartialEq for SkipAll
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl White for SkipAll
[src]