pub fn value(&mut self) -> Result<OsString, Error> {
        self.check_state();

        if let Some(value) = self.optional_value() {
            return Ok(value);
        }

        if let Some(value) = self.source.next() {
            return Ok(value);
        }

        Err(Error::MissingValue {
            option: self.format_last_option(),
        })
    }
/// Get a value for an option.
///
/// This function should normally be called right after seeing an option
/// that expects a value, with positional arguments being collected
/// using [`next()`][Parser::next].
///
/// A value is collected even if it looks like an option
/// (i.e., starts with `-`).
///
/// This method can alternatively be used to collect the remaining
/// arguments if you want to stop processing options. For more information,
/// see [`examples/posixly_correct.rs`](https://github.com/blyxxyz/lexopt/blob/master/examples/posixly_correct.rs).
///
/// # Errors
///
/// An [`Error::MissingValue`] is returned if the end of the command
/// line is reached.
Get a value for an option.
This function should normally be called right after seeing an option
that expects a value, with positional arguments being collected
using [`next()`][Parser::next].

A value is collected even if it looks like an option
.

This method can alternatively be used to collect the remaining
arguments if you want to stop processing options. For more information,
see [`examples/posixly_correct.rs`].
Get a value for an option . This function should normally be called right after seeing an option that expects a value with positional arguments being collected using [ ` next () ` ] [ Parser :: next ] . A value is collected even if it looks like an option . This method can alternatively be used to collect the remaining arguments if you want to stop processing options . For more information see [ ` examples / posixly_correct . rs ` ] .
pub fn value(&mut self) -> Result<OsString, Error> {
        self.check_state();
        if let Some(value) = self.optional_value() {
            return Ok(value);
        }
        if let Some(value) = self.source.next() {
            return Ok(value);
        }
        Err(Error::MissingValue {
            option: self.format_last_option(),
        })
    }
pub fn value ( & mut self ) -> Result < OsString , Error > { self . check_state ( ) ; if let Some ( value ) = self . optional_value ( ) { return Ok ( value ) ; } if let Some ( value ) = self . source . next ( ) { return Ok ( value ) ; } Err ( Error :: MissingValue { option : self . format_last_option ( ) , } ) }
Get a value for an option.
Get a value for an option .
&mut self
errors
An [`Error::MissingValue`] is returned if the end of the command
line is reached.
An [ ` Error :: MissingValue ` ] is returned if the end of the command line is reached .