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]
impl Debug for SkipAll
[src]
impl Eq for SkipAll
[src]
impl PartialEq for SkipAll
[src]
fn eq(&self, __arg_0: &SkipAll) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.