fn from_slice(
input: &[u8],
) -> Result<Option<((SectionKind, Vec<u8>), &[u8])>, Error>
Expand description
Extract and decode the next supported 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((..., remainder)))
whereremainder
is the part of theinput
that follows the returned section