Struct ream::scanner::Scanner[][src]

pub struct Scanner<'source> {
    pub source: &'source [u8],
    pub buffer: VecDeque<Token>,
    pub eof: bool,
    pub loc: Marker,
}

Fields

source: &'source [u8]buffer: VecDeque<Token>eof: boolloc: Marker

Implementations

impl<'source> Scanner<'source>[src]

pub fn new(source: &'source str) -> Self[src]

pub fn next_col(&mut self)[src]

pub fn next_line(&mut self)[src]

pub fn get_source(&self)[src]

pub fn get_loc(&self) -> Marker[src]

pub fn update_source(&mut self, rest: &'source [u8])[src]

pub fn push_token(&mut self, tt: TokenType)[src]

pub fn peek_token(&mut self) -> Result<Option<&Token>, ReamError>[src]

pub fn take_token(&mut self) -> Result<Option<Token>, ReamError>[src]

pub fn skip_whitespaces(&mut self, min: usize) -> Result<(), ReamError>[src]

pub fn scan_line(&mut self) -> Result<(), ReamError>[src]

pub fn scan_line_list_item(&mut self) -> Result<(), ReamError>[src]

pub fn scan_token_block(&mut self) -> Result<(), ReamError>[src]

pub fn scan_token_annotation(&mut self) -> Result<(), ReamError>[src]

pub fn scan_line_annotation(&mut self) -> Result<(), ReamError>[src]

pub fn scan_line_header(&mut self) -> Result<(), ReamError>[src]

pub fn scan_line_variable(&mut self) -> Result<(), ReamError>[src]

pub fn parse_unit_type(&self, t: &str) -> Result<ValueType, ReamError>[src]

pub fn fold_types(
    &self,
    acc: ValueType,
    new_typ: ValueType
) -> Result<ValueType, ReamError>
[src]

pub fn scan_value_type_inner(&mut self) -> Result<ValueType, ReamError>[src]

pub fn scan_token_value_type(&mut self) -> Result<(), ReamError>[src]

pub fn scan_value(&mut self) -> Result<(), ReamError>[src]

pub fn scan_token_colon(&mut self) -> Result<(), ReamError>[src]

pub fn scan_token_header(&mut self) -> Result<(), ReamError>[src]

pub fn scan_token_key(&mut self) -> Result<(), ReamError>[src]

pub fn scan_token_class(&mut self) -> Result<(), ReamError>[src]

pub fn end_of_line(&mut self) -> Result<(), ReamError>[src]

Trait Implementations

impl<'source> Clone for Scanner<'source>[src]

fn clone(&self) -> Scanner<'source>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'source> Debug for Scanner<'source>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'source> RefUnwindSafe for Scanner<'source>

impl<'source> Send for Scanner<'source>

impl<'source> Sync for Scanner<'source>

impl<'source> Unpin for Scanner<'source>

impl<'source> UnwindSafe for Scanner<'source>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.