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

Creates new InputStream over owned data

Creates new InputStream over borrowed data

Resets input stream to start from the beginning of this slice

Trait Implementations

Returns underlying data piece, either slice or owned copy. Panics if provided indexes are invalid Called by parser only on token intervals. This fact can be used by custom implementations Read more

Returns underlying data piece, either slice or owned copy. Panics if provided indexes are invalid Called by parser only on token intervals. This fact can be used by custom implementations Read more

Returns underlying data piece, either slice or owned copy. Panics if provided indexes are invalid Called by parser only on token intervals. This fact can be used by custom implementations Read more

Returns underlying data piece, either slice or owned copy. Panics if provided indexes are invalid Called by parser only on token intervals. This fact can be used by custom implementations Read more

Returns underlying data piece, either slice or owned copy. Panics if provided indexes are invalid Called by parser only on token intervals. This fact can be used by custom implementations Read more

Returns underlying data piece, either slice or owned copy. Panics if provided indexes are invalid Called by parser only on token intervals. This fact can be used by custom implementations Read more

Formats the value using the given formatter. Read more

Consumes the current symbol in the stream. Advances this stream to the next element. Read more

Lookaheads (or loopbacks if i is negative) Read more

After this call subsequent calls to seek must succeed if seek index is greater than mark index Read more

Releases marker

Returns current position of the input stream Read more

Put stream back in state it was when it was in index position Read more

Returns the total number of symbols in the stream.

Returns name of the source this stream operates over if any

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Attempts to downcast this to T behind reference

Attempts to downcast this to T behind mutable reference

Attempts to downcast this to T behind Rc pointer

Attempts to downcast this to T behind Arc pointer

Attempts to downcast this to T behind Box pointer

Attempts to downcast owned Self to T, useful only in generic context as a workaround for specialization Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Returns type id of the type of self Read more

Returns type id of this type

Returns true if type behind self is equal to the type of T.

Attempts to downcast self to T behind reference

Attempts to downcast self to T behind mutable reference

Attempts to downcast self to T behind Rc pointer

Attempts to downcast self to T behind Arc pointer

Attempts to downcast self to T behind Box pointer

Attempts to downcast owned Self to T, useful only in generic context as a workaround for specialization Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.