pub struct InputStream<Data: Deref> { /* private fields */ }
Expand description
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§
Source§impl<'a, Data> InputStream<&'a Data>
impl<'a, Data> InputStream<&'a Data>
Trait Implementations§
Source§impl<'a, T> CharStream<&'a [T]> for InputStream<&'a [T]>
impl<'a, T> CharStream<&'a [T]> for InputStream<&'a [T]>
Source§impl<'a, T> CharStream<Cow<'a, [T]>> for InputStream<&'a [T]>
impl<'a, T> CharStream<Cow<'a, [T]>> for InputStream<&'a [T]>
Source§impl<'a, 'b, T> CharStream<Cow<'b, str>> for InputStream<&'a [T]>
impl<'a, 'b, T> CharStream<Cow<'b, str>> for InputStream<&'a [T]>
Source§impl<'a, T> CharStream<String> for InputStream<&'a [T]>
impl<'a, T> CharStream<String> for InputStream<&'a [T]>
Source§impl<'a, T: From<&'a str>> CharStream<T> for InputStream<&'a str>
impl<'a, T: From<&'a str>> CharStream<T> for InputStream<&'a str>
Source§impl<T: From<D::Owned>, D: ?Sized + InputData> CharStream<T> for InputStream<Box<D>>
impl<T: From<D::Owned>, D: ?Sized + InputData> CharStream<T> for InputStream<Box<D>>
Source§impl<'a, Data: Deref> IntStream for InputStream<Data>
impl<'a, Data: Deref> IntStream for InputStream<Data>
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
impl<'a, T> TidAble<'a> for InputStream<&'a T>where
T: ?Sized + 'static,
impl<'a, T> TidAble<'a> for InputStream<Box<T>>where
T: ?Sized + 'static,
Auto Trait Implementations§
impl<Data> Freeze for InputStream<Data>where
Data: Freeze,
impl<Data> RefUnwindSafe for InputStream<Data>where
Data: RefUnwindSafe,
impl<Data> Send for InputStream<Data>where
Data: Send,
impl<Data> Sync for InputStream<Data>where
Data: Sync,
impl<Data> Unpin for InputStream<Data>where
Data: Unpin,
impl<Data> UnwindSafe for InputStream<Data>where
Data: UnwindSafe,
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