Struct combine::stream::ReadStream [−][src]
Implementations
impl<R> ReadStream<R> where
R: Read,
[src]
R: Read,
pub fn new(read: R) -> ReadStream<R>
[src]
Creates a StreamOnce
instance from a value implementing std::io::Read
.
NOTE: This type do not implement Positioned
and Clone
and must be wrapped with types
such as BufferedStreamRef
and State
to become a Stream
which can be parsed
use combine::*; use combine::parser::byte::*; use combine::stream::ReadStream; use combine::stream::buffered::BufferedStream; use combine::stream::state::State; use std::io::Read; let input: &[u8] = b"123,"; let stream = BufferedStream::new(State::new(ReadStream::new(input)), 1); let result = (many(digit()), byte(b',')) .parse(stream) .map(|t| t.0); assert_eq!(result, Ok((vec![b'1', b'2', b'3'], b',')));
Trait Implementations
impl<R> DefaultPositioned for ReadStream<R>
[src]
type Positioner = IndexPositioner
impl<R: Read> StreamOnce for ReadStream<R>
[src]
type Item = u8
The type of items which is yielded from this stream.
type Range = u8
The type of a range of items yielded from this stream.
Types which do not a have a way of yielding ranges of items should just use the
Self::Item
for this type. Read more
type Position = usize
Type which represents the position in a stream.
Ord
is required to allow parsers to determine which of two positions are further ahead. Read more
type Error = Errors<u8, u8, usize>
fn uncons(&mut self) -> Result<u8, StreamErrorFor<Self>>
[src]
fn is_partial(&self) -> bool
[src]
Auto Trait Implementations
impl<R> RefUnwindSafe for ReadStream<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for ReadStream<R> where
R: Send,
R: Send,
impl<R> Sync for ReadStream<R> where
R: Sync,
R: Sync,
impl<R> Unpin for ReadStream<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for ReadStream<R> where
R: UnwindSafe,
R: 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,
pub fn borrow(&self) -> &TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,