pub struct UnbufferedTokenStream<'input, T: TokenSource<'input>> { /* private fields */ }Expand description
Token stream that keeps all data in internal Vec
Implementations§
Source§impl<'input, T: TokenSource<'input>> UnbufferedTokenStream<'input, T>
 
impl<'input, T: TokenSource<'input>> UnbufferedTokenStream<'input, T>
Sourcepub fn iter(&mut self) -> IterWrapper<'_, Self> ⓘ
 
pub fn iter(&mut self) -> IterWrapper<'_, Self> ⓘ
Creates iterator over this token stream
Sourcepub fn token_iter(&mut self) -> TokenIter<'_, 'input, Self> ⓘ
 
pub fn token_iter(&mut self) -> TokenIter<'_, 'input, Self> ⓘ
Creates iterator over tokens in this token stream
Sourcepub fn new_buffered(source: T) -> Self
 
pub fn new_buffered(source: T) -> Self
Creates token stream that keeps all tokens inside
Sourcepub fn new_unbuffered(source: T) -> Self
 
pub fn new_unbuffered(source: T) -> Self
Creates token stream that keeps only tokens required by mark
Trait Implementations§
Source§impl<'input, T: TokenSource<'input>> Debug for UnbufferedTokenStream<'input, T>
 
impl<'input, T: TokenSource<'input>> Debug for UnbufferedTokenStream<'input, T>
Source§impl<'input, T: TokenSource<'input>> IntStream for UnbufferedTokenStream<'input, T>
 
impl<'input, T: TokenSource<'input>> IntStream for UnbufferedTokenStream<'input, T>
Source§fn consume(&mut self)
 
fn consume(&mut self)
Consumes the current symbol in the stream.
Advances this stream to the next element. Read more
Source§fn mark(&mut self) -> isize
 
fn mark(&mut self) -> isize
After this call subsequent calls to seek must succeed if seek index is greater than mark index Read more
Source§fn seek(&mut self, index: isize)
 
fn seek(&mut self, index: isize)
Put stream back in state it was when it was in 
index position Read moreSource§fn get_source_name(&self) -> String
 
fn get_source_name(&self) -> String
Returns name of the source this stream operates over if any
Source§impl<'input, T: TokenSource<'input>> TokenStream<'input> for UnbufferedTokenStream<'input, T>
 
impl<'input, T: TokenSource<'input>> TokenStream<'input> for UnbufferedTokenStream<'input, T>
Source§type TF = <T as TokenSource<'input>>::TF
 
type TF = <T as TokenSource<'input>>::TF
Token factory that created tokens in this stream
Source§fn lt(&mut self, i: isize) -> Option<&<Self::TF as TokenFactory<'input>>::Tok>
 
fn lt(&mut self, i: isize) -> Option<&<Self::TF as TokenFactory<'input>>::Tok>
Lookahead for tokens, same as 
IntSteam::la but return reference to full tokenSource§fn get(&self, index: isize) -> &<Self::TF as TokenFactory<'input>>::Tok
 
fn get(&self, index: isize) -> &<Self::TF as TokenFactory<'input>>::Tok
Returns reference to token at 
indexSource§fn get_token_source(&self) -> &dyn TokenSource<'input, TF = Self::TF>
 
fn get_token_source(&self) -> &dyn TokenSource<'input, TF = Self::TF>
Token source that produced data for tokens for this stream
Source§fn get_text_from_interval(&self, start: isize, stop: isize) -> String
 
fn get_text_from_interval(&self, start: isize, stop: isize) -> String
Get combined text of tokens in start..=stop interval
Source§fn get_all_text(&self) -> String
 
fn get_all_text(&self) -> String
Get combined text of all tokens in this stream
impl<'input, T> TidAble<'input> for UnbufferedTokenStream<'input, T>where
    T: TokenSource<'input> + TidAble<'input>,
Auto Trait Implementations§
impl<'input, T> Freeze for UnbufferedTokenStream<'input, T>where
    T: Freeze,
impl<'input, T> RefUnwindSafe for UnbufferedTokenStream<'input, T>where
    T: RefUnwindSafe,
    <<T as TokenSource<'input>>::TF as TokenFactory<'input>>::Tok: RefUnwindSafe,
impl<'input, T> Send for UnbufferedTokenStream<'input, T>
impl<'input, T> Sync for UnbufferedTokenStream<'input, T>
impl<'input, T> Unpin for UnbufferedTokenStream<'input, T>
impl<'input, T> UnwindSafe for UnbufferedTokenStream<'input, T>
Blanket Implementations§
Source§impl<T> AnyExt for T
 
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
    T: Any,
 
fn downcast_ref<T>(this: &Self) -> Option<&T>where
    T: Any,
Attempts to downcast this to 
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
    T: Any,
 
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
    T: Any,
Attempts to downcast this to 
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
    T: Any,
 
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
    T: Any,
Attempts to downcast this to 
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
    T: Any,
 
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
    T: Any,
Attempts to downcast this to 
T behind Arc pointerSource§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, X> CoerceTo<T> for Xwhere
    T: CoerceFrom<X> + ?Sized,
 
impl<T, X> CoerceTo<T> for Xwhere
    T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
Source§impl<'a, X> TidExt<'a> for X
 
impl<'a, X> TidExt<'a> for X
Source§fn is<T>(&self) -> boolwhere
    T: Tid<'a>,
 
fn is<T>(&self) -> boolwhere
    T: Tid<'a>,
Returns true if type behind self is equal to the type of T.
Source§fn downcast_ref<'b, T>(&'b self) -> Option<&'b T>where
    T: Tid<'a>,
 
fn downcast_ref<'b, T>(&'b self) -> Option<&'b T>where
    T: Tid<'a>,
Attempts to downcast self to 
T behind referenceSource§fn downcast_mut<'b, T>(&'b mut self) -> Option<&'b mut T>where
    T: Tid<'a>,
 
fn downcast_mut<'b, T>(&'b mut self) -> Option<&'b mut T>where
    T: Tid<'a>,
Attempts to downcast self to 
T behind mutable referenceSource§fn downcast_rc<T>(self: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
    T: Tid<'a>,
 
fn downcast_rc<T>(self: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
    T: Tid<'a>,
Attempts to downcast self to 
T behind Rc pointerSource§fn downcast_arc<T>(self: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
    T: Tid<'a>,
 
fn downcast_arc<T>(self: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
    T: Tid<'a>,
Attempts to downcast self to 
T behind Arc pointer