[−][src]Struct basn1::der::writer::Writer
ASN.1 DER Writer to a mutable buffer
Implementations
impl<'a> Writer<'a>
[src]
pub fn new(buf: &'a mut [u8]) -> Self
[src]
create a new DER writer, with the buffer as the user allocated write buffer
pub fn bool(&mut self, b: bool) -> Result<(), Error>
[src]
Write a boolean to the DER writer
pub fn integer<'b>(&mut self, integer: &'b Integer) -> Result<(), Error>
[src]
Write an Integer to the DER writer
pub fn enumerated<'b>(
&mut self,
enumerated: &'b Enumerated
) -> Result<(), Error>
[src]
&mut self,
enumerated: &'b Enumerated
) -> Result<(), Error>
Write an Enumerated to the DER writer
pub fn bitstring<'b>(&mut self, obj: &'b BitString) -> Result<(), Error>
[src]
Write a bitstring to the DER writer
pub fn octetstring<'b>(&mut self, obj: &'b [u8]) -> Result<(), Error>
[src]
Write a octetstring to the DER writer
pub fn null(&mut self) -> Result<(), Error>
[src]
Write a null to the DER writer
pub fn utf8_string<'b>(&mut self, str: &'b str) -> Result<(), Error>
[src]
Write a utf8 string to the DER writer
pub fn sequence<'b, F>(&mut self, f: F) -> Result<(), Error> where
F: Fn(&mut Self) -> Result<(), Error>,
[src]
F: Fn(&mut Self) -> Result<(), Error>,
Write a sequence to the DER writer
pub fn current_position(&self) -> usize
[src]
Get the current position in the Writer, which is also the number of byte written
pub fn finish<'b: 'a>(&'b self) -> &'a [u8]
[src]
Return the inner sub-slice with a valid DER stream of data
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, 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>,