rustmax::nom

Type Alias PResult

Source
pub type PResult<OM, I, O, E> = Result<(I, <<OM as OutputMode>::Output as Mode>::Output<O>), Err<E, <<OM as OutputMode>::Error as Mode>::Output<E>>>;
Expand description

Parser result type

  • Ok branch: a tuple of the remaining input data, and the output value. The output value is of the O type if the output mode was Emit, and () if the mode was Check
  • Err branch: an error of the E type if the erroor mode was Emit, and () if the mode was Check

Aliased Type§

enum PResult<OM, I, O, E> {
    Ok((I, <<OM as OutputMode>::Output as Mode>::Output<O>)),
    Err(Err<E, <<OM as OutputMode>::Error as Mode>::Output<E>>),
}

Variants§

§1.0.0

Ok((I, <<OM as OutputMode>::Output as Mode>::Output<O>))

Contains the success value

§1.0.0

Err(Err<E, <<OM as OutputMode>::Error as Mode>::Output<E>>)

Contains the error value