[−][src]Struct antlr_rust::input_stream::InputStream
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]
impl<'a, Data: ?Sized> InputStream<&'a Data> where
Data: InputData,
[src]
Data: InputData,
impl<'a, Data: Deref> InputStream<Data> where
Data::Target: InputData,
[src]
Data::Target: InputData,
Trait Implementations
impl<'a, T> CharStream<&'a [T]> for InputStream<&'a [T]> where
[T]: InputData,
[src]
[T]: InputData,
impl<'a, T> CharStream<Cow<'a, [T]>> for InputStream<&'a [T]> where
[T]: InputData,
[src]
[T]: InputData,
impl<'a, 'b, T> CharStream<Cow<'b, str>> for InputStream<&'a [T]> where
[T]: InputData,
[src]
[T]: InputData,
impl<'a, T> CharStream<String> for InputStream<&'a [T]> where
[T]: InputData,
[src]
[T]: InputData,
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]
Data::Target: InputData,
pub fn consume(&mut self)
[src]
pub fn la(&mut self, offset: isize) -> isize
[src]
pub fn mark(&mut self) -> isize
[src]
pub fn release(&mut self, _marker: isize)
[src]
pub fn index(&self) -> isize
[src]
pub fn seek(&mut self, index: isize)
[src]
pub fn size(&self) -> isize
[src]
pub fn get_source_name(&self) -> String
[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]
Data: RefUnwindSafe,
impl<Data> Send for InputStream<Data> where
Data: Send,
[src]
Data: Send,
impl<Data> Sync for InputStream<Data> where
Data: Sync,
[src]
Data: Sync,
impl<Data> Unpin for InputStream<Data> where
Data: Unpin,
[src]
Data: Unpin,
impl<Data> UnwindSafe for InputStream<Data> where
Data: UnwindSafe,
[src]
Data: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> NodeText for T
[src]
impl<'a, T> Tid<'a> for T where
T: TidAble<'a> + ?Sized,
[src]
T: TidAble<'a> + ?Sized,
impl<'a, X> TidExt<'a> for X where
X: Tid<'a> + ?Sized,
[src]
X: Tid<'a> + ?Sized,
pub fn is<T>(&self) -> bool where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_ref<T>(&'b self) -> Option<&'b T> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_mut<T>(&'b mut self) -> Option<&'b mut T> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_rc<T>(self: Rc<X>) -> Result<Rc<T>, Rc<X>> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_arc<T>(self: Arc<X>) -> Result<Arc<T>, Arc<X>> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_box<T>(
self: Box<X, Global>
) -> Result<Box<T, Global>, Box<X, Global>> where
T: Tid<'a>,
[src]
self: Box<X, Global>
) -> Result<Box<T, Global>, Box<X, Global>> where
T: Tid<'a>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,