Function untrusted::read_all_optional
source · [−]pub fn read_all_optional<F, R, E>(
input: Option<Input<'_>>,
incomplete_read: E,
read: F
) -> Result<R, E> where
F: FnOnce(Option<&mut Reader<'_>>) -> 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.