untrusted

Function read_all_optional

Source
pub fn read_all_optional<'a, F, R, E>(
    input: Option<Input<'a>>,
    incomplete_read: E,
    read: F,
) -> Result<R, E>
where F: FnOnce(Option<&mut Reader<'a>>) -> Result<R, E>,
Expand description

Calls read with the given input as a Reader, ensuring that read consumed the entire input. When input is None, read will be called with None.