Struct pest::inputs::StringInput [] [src]

pub struct StringInput { /* fields omitted */ }

A struct useful for matching heap-allocated Strings.

Methods

impl StringInput
[src]

Creates a new StringInput from a String.

Examples

let input = StringInput::new("asd".to_owned());

assert_eq!(input.len(), 3);

Trait Implementations

impl Clone for StringInput
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for StringInput
[src]

Formats the value using the given formatter.

impl Eq for StringInput
[src]

impl Hash for StringInput
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for StringInput
[src]

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

This method tests for !=.

impl Input for StringInput
[src]

Returns length of the input.

Returns whether the input is empty.

Returns the file name of the input or None in the case where it doesn't have one.

Slices the input. Read more

Returns the line - and column number of the input at pos. Read more

Returns the line of the input at pos. Read more

Tries to skip n chars at pos. Returns Some(len) with the UTF-8 length of the skipped chars position or None if there are not enough chars left to skip. Read more

Matches string at pos and returns whether it matched. Read more

Matches string at pos case insensitively and returns whether it matched. Read more

Matches if the char is within the range and returns Some(len) with the matching char's UTF-8 length if it matched or None otherwise. Read more