[][src]Struct antlr_rust::input_stream::InputStream

pub struct InputStream<Data: Deref> { /* fields omitted */ }

Default rust target input stream.

Since Rust uses UTF-8 format which does not support indexing by char, InputStream<&str> has slightly different index behavior in compare to java runtime when there are non-ASCII unicode characters. If you need it to generate exactly the same indexes as Java runtime, you have to use CodePoint8/16/32BitCharStream, which does not use rusts native str type, so it would do additional conversions and allocations along the way.

Implementations

impl<Data: ?Sized + InputData> InputStream<Box<Data>>[src]

pub fn new_owned(data: Box<Data>) -> Self[src]

Creates new InputStream over owned data

impl<'a, Data: ?Sized> InputStream<&'a Data> where
    Data: InputData
[src]

pub fn new(data_raw: &'a Data) -> Self[src]

Creates new InputStream over borrowed data

impl<'a, Data: Deref> InputStream<Data> where
    Data::Target: InputData
[src]

pub fn reset(&mut self)[src]

Resets input stream to start from the beginning of this slice

Trait Implementations

impl<'a, T> CharStream<&'a [T]> for InputStream<&'a [T]> where
    [T]: InputData
[src]

impl<'a, T> CharStream<Cow<'a, [T]>> for InputStream<&'a [T]> where
    [T]: InputData
[src]

impl<'a, 'b, T> CharStream<Cow<'b, str>> for InputStream<&'a [T]> where
    [T]: InputData
[src]

impl<'a, T> CharStream<String> for InputStream<&'a [T]> where
    [T]: InputData
[src]

impl<'a, T: From<&'a str>> CharStream<T> for InputStream<&'a str>[src]

impl<T: From<D::Owned>, D: ?Sized + InputData> CharStream<T> for InputStream<Box<D>>[src]

impl<Data: Debug + Deref> Debug for InputStream<Data>[src]

impl<'a, Data: Deref> IntStream for InputStream<Data> where
    Data::Target: InputData
[src]

impl<'a, T: ?Sized + 'static> TidAble<'a> for InputStream<&'a T>[src]

type Static = __InputStreamaT_should_never_exist<T>

impl<'a, T: ?Sized + 'static> TidAble<'a> for InputStream<Box<T>>[src]

type Static = __InputStreamBoxT_should_never_exist<T>

Auto Trait Implementations

impl<Data> RefUnwindSafe for InputStream<Data> where
    Data: RefUnwindSafe
[src]

impl<Data> Send for InputStream<Data> where
    Data: Send
[src]

impl<Data> Sync for InputStream<Data> where
    Data: Sync
[src]

impl<Data> Unpin for InputStream<Data> where
    Data: Unpin
[src]

impl<Data> UnwindSafe for InputStream<Data> where
    Data: UnwindSafe
[src]

Blanket Implementations

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

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

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

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

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

impl<T> NodeText for T[src]

impl<'a, T> Tid<'a> for T where
    T: TidAble<'a> + ?Sized
[src]

impl<'a, X> TidExt<'a> for X where
    X: Tid<'a> + ?Sized
[src]

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.

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.