[−][src]Struct basn1::der::reader::Reader
ASN.1 DER Reader on slice
Implementations
impl<'a> Reader<'a>
[src]
pub fn new(slice: &'a [u8]) -> Self
[src]
Create a new DER Reader where the read buffer is given by the user
pub fn anything(&mut self) -> Result<(Identifier, Length, &'a [u8]), Error>
[src]
Get the next Tag / Length / Value triple, whichever it is
pub fn bool(&mut self) -> Result<bool, Error>
[src]
Get the next boolean from the stream
pub fn integer(&mut self) -> Result<&'a Integer, Error>
[src]
Get the next integer from the stream
pub fn enumerated(&mut self) -> Result<&'a Enumerated, Error>
[src]
Get the next enumerated from the stream
pub fn bitstring(&mut self) -> Result<&'a BitString, Error>
[src]
Get the next bitstring from the stream
pub fn octetstring(&mut self) -> Result<&'a [u8], Error>
[src]
Get the next octetstring from the stream
pub fn utf8_string(&mut self) -> Result<&'a str, Error>
[src]
Get the next utf8 string from the stream
pub fn null(&mut self) -> Result<(), Error>
[src]
Get the next null from the stream
pub fn oid(&mut self) -> Result<&'a OID, Error>
[src]
Get the next OID from the stream
pub fn sequence(&mut self) -> Result<Reader<'a>, Error>
[src]
Get the next sequence from the stream as a Reader
pub fn set<A, F>(&mut self, f: F) -> Result<Set<'a, F>, Error> where
F: Fn(Reader<'a>) -> Result<A, Error>,
[src]
F: Fn(Reader<'a>) -> Result<A, Error>,
Get the next set from the stream as a Set iterator
pub fn done(&self) -> Result<(), Error>
[src]
Check is the stream is done
If the reader is not finished, then the Error::ReaderNotTerminated is returned
pub fn current_position(&self) -> usize
[src]
Get the position of the reader in the slice
pub fn remaining(&self) -> &'a [u8]
[src]
Get the remaining buffer as a slice
Trait Implementations
impl<'a> Clone for Reader<'a>
[src]
fn clone(&self) -> Reader<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,