Struct pem_rfc7468::Decoder
source · pub struct Decoder {
pub wrap_width: usize,
}
Expand description
PEM decoder.
This type provides a degree of configurability for how PEM is decoded.
Fields§
§wrap_width: usize
Number of characters at which to line-wrap Base64-encoded data
(default 64
).
Must be a multiple of 4
, or otherwise decoding operations will return
Error::Base64
.
Implementations§
source§impl Decoder
impl Decoder
sourcepub fn decode<'i, 'o>(
&self,
pem: &'i [u8],
buf: &'o mut [u8]
) -> Result<(&'i str, &'o [u8])>
pub fn decode<'i, 'o>( &self, pem: &'i [u8], buf: &'o mut [u8] ) -> Result<(&'i str, &'o [u8])>
Decode a PEM document according to RFC 7468’s “Strict” grammar.
On success, writes the decoded document into the provided buffer, returning the decoded label and the portion of the provided buffer containing the decoded message.
Trait Implementations§
source§impl PartialEq for Decoder
impl PartialEq for Decoder
impl Copy for Decoder
impl Eq for Decoder
impl StructuralEq for Decoder
impl StructuralPartialEq for Decoder
Auto Trait Implementations§
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnwindSafe for Decoder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more