pub struct Der<'a> { /* private fields */ }Expand description
Sequential reader over concatenated DER elements.
Implementations§
Source§impl<'a> Der<'a>
impl<'a> Der<'a>
pub fn new(data: &'a [u8]) -> Der<'a>
pub fn is_empty(&self) -> bool
pub fn peek_tag(&self) -> Option<u8>
pub fn read(&mut self) -> DerResult<Tlv<'a>>
Sourcepub fn optional(&mut self, tag: u8) -> DerResult<Option<Tlv<'a>>>
pub fn optional(&mut self, tag: u8) -> DerResult<Option<Tlv<'a>>>
Reads the element only if the next tag matches.
pub fn sequence(&mut self) -> DerResult<Der<'a>>
pub fn oid(&mut self) -> DerResult<String>
Sourcepub fn uint(&mut self) -> DerResult<&'a [u8]>
pub fn uint(&mut self) -> DerResult<&'a [u8]>
INTEGER as unsigned big-endian bytes (leading zero stripped); rejects negatives.
pub fn small_uint(&mut self) -> DerResult<u64>
pub fn octet_string(&mut self) -> DerResult<&'a [u8]>
Sourcepub fn bit_string(&mut self) -> DerResult<&'a [u8]>
pub fn bit_string(&mut self) -> DerResult<&'a [u8]>
BIT STRING contents; requires zero unused bits.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for Der<'a>
impl<'a> Freeze for Der<'a>
impl<'a> Move for Der<'a>
impl<'a> RefUnwindSafe for Der<'a>
impl<'a> Send for Der<'a>
impl<'a> Sync for Der<'a>
impl<'a> Unpin for Der<'a>
impl<'a> UnsafeUnpin for Der<'a>
impl<'a> UnwindSafe for Der<'a>
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