[][src]Struct java_properties::PropertiesIter

pub struct PropertiesIter<R: Read> { /* fields omitted */ }

Parses a properties file and iterates over its contents.

For basic usage, see the crate-level documentation. Note that once next returns an error, the result of further calls is undefined.

Implementations

impl<R: Read> PropertiesIter<R>[src]

pub fn new(input: R) -> Self[src]

Parses properties from the given Read stream.

pub fn new_with_encoding(input: R, encoding: &'static dyn Encoding) -> Self[src]

Parses properties from the given Read stream in the given encoding. Note that the Java properties specification specifies ISO-8859-1 encoding for properties files; in most cases, new should be called instead.

pub fn read_into<F: FnMut(String, String)>(
    &mut self,
    f: F
) -> Result<(), PropertiesError>
[src]

Calls f for each key/value pair.

Line numbers and comments are ignored. On the first error, the error is returned. Note that f may have already been called at this point.

Trait Implementations

impl<R: Read> Iterator for PropertiesIter<R>[src]

Note that once next returns an error, the result of further calls is undefined.

type Item = Result<Line, PropertiesError>

The type of the elements being iterated over.

fn next(&mut self) -> Option<Self::Item>[src]

Returns the next line.

Once this returns an error, the result of further calls is undefined.

Auto Trait Implementations

impl<R> !RefUnwindSafe for PropertiesIter<R>

impl<R> !Send for PropertiesIter<R>

impl<R> !Sync for PropertiesIter<R>

impl<R> Unpin for PropertiesIter<R> where
    R: Unpin

impl<R> !UnwindSafe for PropertiesIter<R>

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.