Function read_one_from_slice
pub fn read_one_from_slice(input: &[u8]) -> Result<Option<(Item, &[u8])>, Error>
Expand description
Extract and decode the next PEM section from input
Ok(None)
is returned if there is no PEM section to read frominput
- Syntax errors and decoding errors produce a
Err(...)
- Otherwise each decoded section is returned with a
Ok(Some((Item::..., remainder)))
whereremainder
is the part of theinput
that follows the returned section