Struct ethers::core::k256::elliptic_curve::pkcs8::der::Encoder [−][src]
pub struct Encoder<'a> { /* fields omitted */ }
Expand description
DER encoder.
Implementations
Create a new encoder with the given byte slice as a backing buffer.
Encode a value which impls the Encodable
trait.
Return an error with the given ErrorKind
, annotating it with
context about where the error occurred.
Return an error for an invalid value with the given tag.
Finish encoding to the buffer, returning a slice containing the data written to the buffer.
Encode the provided value as an ASN.1 BIT STRING
Encode the provided value as an ASN.1 GeneralizedTime
Encode the provided value as an ASN.1 IA5String
Encode a message with the provided Encodable
fields as an
ASN.1 SEQUENCE
.
Encode the provided value as an ASN.1 OCTET STRING
Encode an ASN.1 ObjectIdentifier
pub fn printable_string(
&mut self,
value: impl TryInto<PrintableString<'a>>
) -> Result<(), Error>
pub fn printable_string(
&mut self,
value: impl TryInto<PrintableString<'a>>
) -> Result<(), Error>
Encode the provided value as an ASN.1 PrintableString
Encode an ASN.1 SEQUENCE
of the given length.
Spawns a nested Encoder
which is expected to be exactly the
specified length upon completion.
Encode the provided value as an ASN.1 UTCTime
Encode the provided value as an ASN.1 Utf8String
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Encoder<'a>
impl<'a> !UnwindSafe for Encoder<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more