Struct charwise::Charwise[][src]

pub struct Charwise<S: Bufferize> { /* fields omitted */ }

Implementations

impl Charwise<BufReader<File>>[src]

pub fn from_file(file: File) -> Self[src]

impl Charwise<Stdin>[src]

pub fn from_stdin() -> Self[src]

impl<S: Bufferize> Charwise<S>[src]

pub fn reading_position(&self) -> usize[src]

Returns the position of the next character to be read, or, in other words, the amount of characters read so far

pub fn peek(&mut self) -> Option<Result<char>>[src]

Reads the next character without changing the current position

pub fn peek_nth(&mut self, n: usize) -> Option<Result<char>>[src]

Reads the n-th character ahead of the reader without altering the current position, calling peek_nth(0) is equivalent to reading the next character similar to next()

pub fn skip_peeked(&mut self)[src]

Assuming the character has been peeked, advance the stream without looking at it Call this function only in case you just want to skip the current character because you already know it after calling peek.

pub fn skip_n_peeked(&mut self, n: usize)[src]

Similar to skip_peeked, this function should be called only after calling peek(k) for k >= n. In other words, the function expects that at least n characters are already buffered and assumes that without further checks.

Trait Implementations

impl<S: Bufferize> Iterator for Charwise<S>[src]

type Item = Result<char>

The type of the elements being iterated over.

Auto Trait Implementations

impl<S> RefUnwindSafe for Charwise<S> where
    S: RefUnwindSafe

impl<S> Send for Charwise<S> where
    S: Send

impl<S> Sync for Charwise<S> where
    S: Sync

impl<S> Unpin for Charwise<S> where
    S: Unpin

impl<S> UnwindSafe for Charwise<S> where
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.