diff --git a/flexiber/all.html b/flexiber/all.html index 2d9863c..3772efb 100644 --- a/flexiber/all.html +++ b/flexiber/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Derive Macros

Type Aliases

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Derive Macros

Type Aliases

\ No newline at end of file diff --git a/flexiber/derive.Decodable.html b/flexiber/derive.Decodable.html index a05d1ff..e4ff772 100644 --- a/flexiber/derive.Decodable.html +++ b/flexiber/derive.Decodable.html @@ -1,4 +1,4 @@ -Decodable in flexiber - Rust
flexiber

Derive Macro Decodable

Source
#[derive(Decodable)]
+Decodable in flexiber - Rust
flexiber

Derive Macro Decodable

Source
#[derive(Decodable)]
 {
     // Attributes available to this derive:
     #[tlv]
diff --git a/flexiber/derive.Encodable.html b/flexiber/derive.Encodable.html
index 3069285..e2490ab 100644
--- a/flexiber/derive.Encodable.html
+++ b/flexiber/derive.Encodable.html
@@ -1,4 +1,4 @@
-Encodable in flexiber - Rust
flexiber

Derive Macro Encodable

Source
#[derive(Encodable)]
+Encodable in flexiber - Rust
flexiber

Derive Macro Encodable

Source
#[derive(Encodable)]
 {
     // Attributes available to this derive:
     #[tlv]
diff --git a/flexiber/enum.Class.html b/flexiber/enum.Class.html
index 575f38d..0843c7e 100644
--- a/flexiber/enum.Class.html
+++ b/flexiber/enum.Class.html
@@ -1,4 +1,4 @@
-Class in flexiber - Rust
flexiber

Enum Class

Source
#[repr(u8)]
pub enum Class { +Class in flexiber - Rust
flexiber

Enum Class

Source
#[repr(u8)]
pub enum Class { Universal = 0, Application = 1, Context = 2, diff --git a/flexiber/enum.ErrorKind.html b/flexiber/enum.ErrorKind.html index 9bab390..0e58d5f 100644 --- a/flexiber/enum.ErrorKind.html +++ b/flexiber/enum.ErrorKind.html @@ -1,4 +1,4 @@ -ErrorKind in flexiber - Rust
flexiber

Enum ErrorKind

Source
#[non_exhaustive]
pub enum ErrorKind { +ErrorKind in flexiber - Rust
flexiber

Enum ErrorKind

Source
#[non_exhaustive]
pub enum ErrorKind { Failed, InvalidClass { value: u8, diff --git a/flexiber/index.html b/flexiber/index.html index c680623..ee05f01 100644 --- a/flexiber/index.html +++ b/flexiber/index.html @@ -1,4 +1,4 @@ -flexiber - Rust

Crate flexiber

Source
Expand description

§flexiber

+flexiber - Rust

Crate flexiber

Source
Expand description

§flexiber

Implementation of the BER-TLV serialization format from ISO 7816-4:2005.

ITU-T X.690 (08/2015) defines the BER, CER and DER encoding rules for ASN.1

The exact same document is ISO/IET 8825-1, which is freely available, diff --git a/flexiber/struct.Decoder.html b/flexiber/struct.Decoder.html index a541383..da1d6bc 100644 --- a/flexiber/struct.Decoder.html +++ b/flexiber/struct.Decoder.html @@ -1,4 +1,4 @@ -Decoder in flexiber - Rust

flexiber

Struct Decoder

Source
pub struct Decoder<'a> { /* private fields */ }
Expand description

BER-TLV decoder.

+Decoder in flexiber - Rust
flexiber

Struct Decoder

Source
pub struct Decoder<'a> { /* private fields */ }
Expand description

BER-TLV decoder.

Implementations§

Source§

impl<'a> Decoder<'a>

Source

pub fn new(bytes: &'a [u8]) -> Self

Create a new decoder for the given byte slice.

Source

pub fn decode<T: Decodable<'a>>(&mut self) -> Result<T>

Decode a value which impls the Decodable trait.

Source

pub fn decode_tagged_value<T: Decodable<'a> + TagLike, V: Decodable<'a>>( diff --git a/flexiber/struct.Encoder.html b/flexiber/struct.Encoder.html index a2774b1..1a81f1d 100644 --- a/flexiber/struct.Encoder.html +++ b/flexiber/struct.Encoder.html @@ -1,4 +1,4 @@ -Encoder in flexiber - Rust
flexiber

Struct Encoder

Source
pub struct Encoder<'a> { /* private fields */ }
Expand description

BER-TLV encoder.

+Encoder in flexiber - Rust
flexiber

Struct Encoder

Source
pub struct Encoder<'a> { /* private fields */ }
Expand description

BER-TLV encoder.

Implementations§

Source§

impl<'a> Encoder<'a>

Source

pub fn new(bytes: &'a mut [u8]) -> Self

Create a new encoder with the given byte slice as a backing buffer.

Source

pub fn encode<T: Encodable>(&mut self, encodable: &T) -> Result<()>

Encode a value which impls the Encodable trait.

Source

pub fn error<T>(&mut self, kind: ErrorKind) -> Result<T>

Return an error with the given ErrorKind, annotating it with diff --git a/flexiber/struct.Error.html b/flexiber/struct.Error.html index a25cbdb..0aac8e0 100644 --- a/flexiber/struct.Error.html +++ b/flexiber/struct.Error.html @@ -1,4 +1,4 @@ -Error in flexiber - Rust

flexiber

Struct Error

Source
pub struct Error { /* private fields */ }
Expand description

Error type.

+Error in flexiber - Rust
flexiber

Struct Error

Source
pub struct Error { /* private fields */ }
Expand description

Error type.

Implementations§

Source§

impl Error

Source

pub fn new(kind: ErrorKind, position: Length) -> Error

Create a new Error

Source

pub fn kind(self) -> ErrorKind

Get the ErrorKind which occurred.

Source

pub fn position(self) -> Option<Length>

Get the position inside of the message where the error occurred.

diff --git a/flexiber/struct.Length.html b/flexiber/struct.Length.html index b77c65b..3c955cb 100644 --- a/flexiber/struct.Length.html +++ b/flexiber/struct.Length.html @@ -1,4 +1,4 @@ -Length in flexiber - Rust
flexiber

Struct Length

Source
pub struct Length(/* private fields */);
Expand description

BER-TLV-encoded length.

+Length in flexiber - Rust
flexiber

Struct Length

Source
pub struct Length(/* private fields */);
Expand description

BER-TLV-encoded length.

By definition, in the range 0..=65535

The length field consists of one or three consecutive bytes.