Skip to main content

one_or_none_bytes

Function one_or_none_bytes 

Source
pub fn one_or_none_bytes<'a, T: FromStr>(
    values: impl Iterator<Item = &'a [u8]>,
) -> Result<Option<T>, ParseError>
where T::Err: Error + Send + Sync + 'static,
Expand description

Read exactly one or none from a raw header bytes iterator

Like one_or_none, but accepts raw bytes. A value that is not valid UTF-8 produces a ParseError.

This function does not perform comma splitting like read_many_from_str_bytes.