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][+]
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,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
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>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,