Function dec_int

fn dec_int<Input, Output, Error>(input: &mut Input) -> Result<Output, Error>
where
    Input: StreamIsPartial + Stream,
    <Input as Stream>::Slice: AsBStr,
    <Input as Stream>::Token: AsChar + Clone,
    Output: Int,
    Error: ParserError<Input>

Decode a decimal signed integer (e.g. i32)

Complete version: can parse until the end of input.

[Partial version][crate::_topic::partial]: Will return Err(winnow::error::ErrMode::Incomplete(_)) if there's not enough input data.

Effective Signature

Assuming you are parsing a &str [Stream] into an i32:

# use winnow::prelude::*;;
pub fn dec_int(input: &mut &str) -> ModalResult<i32>
# {
#     winnow::ascii::dec_int.parse_next(input)
# }