diff --git a/flexiber/all.html b/flexiber/all.html index 2d9863c..3772efb 100644 --- a/flexiber/all.html +++ b/flexiber/all.html @@ -1 +1 @@ -
#[derive(Decodable)]
+Decodable in flexiber - Rust #[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 #[derive(Encodable)]
+Encodable in flexiber - Rust #[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 #[repr(u8)]pub enum Class {
+Class in flexiber - Rust #[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 #[non_exhaustive]pub enum ErrorKind {
+ErrorKind in flexiber - Rust #[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 Expand description
§flexiber
+flexiber - Rust 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 pub struct Decoder<'a> { /* private fields */ }
Expand description
BER-TLV decoder.
+Decoder in flexiber - Rust pub struct Decoder<'a> { /* private fields */ }
Expand description
BER-TLV decoder.
Implementations§
Source§impl<'a> Decoder<'a>
Sourcepub fn decode<T: Decodable<'a>>(&mut self) -> Result<T>
Decode a value which impls the Decodable trait.
Sourcepub 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 pub struct Encoder<'a> { /* private fields */ }
Expand description
BER-TLV encoder.
+Encoder in flexiber - Rust pub struct Encoder<'a> { /* private fields */ }
Expand description
BER-TLV encoder.
Implementations§
Source§impl<'a> Encoder<'a>
Sourcepub fn new(bytes: &'a mut [u8]) -> Self
Create a new encoder with the given byte slice as a backing buffer.
Sourcepub fn encode<T: Encodable>(&mut self, encodable: &T) -> Result<()>
Encode a value which impls the Encodable trait.
Sourcepub 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 pub struct Error { /* private fields */ }
Expand description
Error type.
+Error in flexiber - Rust pub struct Error { /* private fields */ }
Expand description
Error type.
Implementations§
Source§impl Error
Sourcepub 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 pub struct Length(/* private fields */);
Expand description
BER-TLV-encoded length.
+Length in flexiber - Rust 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.
diff --git a/flexiber/struct.SimpleTag.html b/flexiber/struct.SimpleTag.html
index 3c21c69..d49c732 100644
--- a/flexiber/struct.SimpleTag.html
+++ b/flexiber/struct.SimpleTag.html
@@ -1,4 +1,4 @@
-SimpleTag in flexiber - Rust pub struct SimpleTag(/* private fields */);
Expand description
These are tags like in SIMPLE-TLV.
+SimpleTag in flexiber - Rust pub struct SimpleTag(/* private fields */);
Expand description
These are tags like in SIMPLE-TLV.
The tag field consists of a single byte encoding a tag number from 1 to 254. The values ‘00’ and ‘FF’ are invalid.
The use case is that PIV (FIPS 201) data objects generally use BER-TLV, but, for historical reasons,
label entries with “simple” tags (in particular, tag numbers larger than 30 are still encoded
diff --git a/flexiber/struct.Slice.html b/flexiber/struct.Slice.html
index 3a81f89..7af4181 100644
--- a/flexiber/struct.Slice.html
+++ b/flexiber/struct.Slice.html
@@ -1,4 +1,4 @@
-
Slice in flexiber - Rust pub struct Slice<'a> { /* private fields */ }
Expand description
Slice of at most Length::max() bytes.
+Slice in flexiber - Rust pub struct Slice<'a> { /* private fields */ }
Expand description
Slice of at most Length::max() bytes.
Implementations§
Source§impl<'a> Slice<'a>
Sourcepub fn new(slice: &'a [u8]) -> Result<Self>
Create a new Slice, ensuring that the provided slice value
is shorter than Length::max().
Sourcepub fn as_bytes(&self) -> &'a [u8]
Borrow the inner byte slice
diff --git a/flexiber/struct.Tag.html b/flexiber/struct.Tag.html
index 5ed868e..a3899f6 100644
--- a/flexiber/struct.Tag.html
+++ b/flexiber/struct.Tag.html
@@ -1,4 +1,4 @@
-Tag in flexiber - Rust pub struct Tag {
+Tag in flexiber - Rust pub struct Tag {
pub class: Class,
pub constructed: bool,
pub number: u16,
diff --git a/flexiber/struct.TaggedValue.html b/flexiber/struct.TaggedValue.html
index db5ccfd..9644a12 100644
--- a/flexiber/struct.TaggedValue.html
+++ b/flexiber/struct.TaggedValue.html
@@ -1,4 +1,4 @@
-TaggedValue in flexiber - Rust pub struct TaggedValue<V, T = Tag> { /* private fields */ }
Expand description
BER-TLV data object.
+TaggedValue in flexiber - Rust pub struct TaggedValue<V, T = Tag> { /* private fields */ }
Expand description
BER-TLV data object.
Implementations§
Source§impl<V, T> TaggedValue<V, T>where
T: Copy,
Source§impl<'a, T> TaggedValue<Slice<'a>, T>where
T: Copy,
Sourcepub fn from(tag: T, slice: &'a [u8]) -> Result<Self>
Create a new tagged slice, checking lengths.
diff --git a/flexiber/trait.Container.html b/flexiber/trait.Container.html
index 79e5133..84585a3 100644
--- a/flexiber/trait.Container.html
+++ b/flexiber/trait.Container.html
@@ -1,4 +1,4 @@
-Container in flexiber - Rust pub trait Container {
+Container in flexiber - Rust pub trait Container {
// Required method
fn fields<F, T>(&self, f: F) -> Result<T>
where F: FnOnce(&[&dyn Encodable]) -> Result<T>;
diff --git a/flexiber/trait.Decodable.html b/flexiber/trait.Decodable.html
index 694c408..47facc9 100644
--- a/flexiber/trait.Decodable.html
+++ b/flexiber/trait.Decodable.html
@@ -1,4 +1,4 @@
-Decodable in flexiber - Rust pub trait Decodable<'a>: Sized {
+Decodable in flexiber - Rust pub trait Decodable<'a>: Sized {
// Required method
fn decode(decoder: &mut Decoder<'a>) -> Result<Self>;
diff --git a/flexiber/trait.Encodable.html b/flexiber/trait.Encodable.html
index bf2cf60..efa2e9b 100644
--- a/flexiber/trait.Encodable.html
+++ b/flexiber/trait.Encodable.html
@@ -1,4 +1,4 @@
-Encodable in flexiber - Rust pub trait Encodable {
+Encodable in flexiber - Rust pub trait Encodable {
// Required methods
fn encoded_length(&self) -> Result<Length>;
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>;
diff --git a/flexiber/trait.TagLike.html b/flexiber/trait.TagLike.html
index d5562f0..fe117f3 100644
--- a/flexiber/trait.TagLike.html
+++ b/flexiber/trait.TagLike.html
@@ -1,4 +1,4 @@
-TagLike in flexiber - Rust pub trait TagLike:
+TagLike in flexiber - Rust pub trait TagLike:
Copy
+ PartialEq
+ Sized {
diff --git a/flexiber/trait.Tagged.html b/flexiber/trait.Tagged.html
index ffd4fe4..6385854 100644
--- a/flexiber/trait.Tagged.html
+++ b/flexiber/trait.Tagged.html
@@ -1,4 +1,4 @@
-Tagged in flexiber - Rust pub trait Tagged {
+Tagged in flexiber - Rust pub trait Tagged {
// Required method
fn tag() -> Tag;
}
Expand description
Types with an associated BER-TLV Tag.
diff --git a/flexiber/type.Result.html b/flexiber/type.Result.html
index 2be2e0f..d57ac5d 100644
--- a/flexiber/type.Result.html
+++ b/flexiber/type.Result.html
@@ -1,4 +1,4 @@
-Result in flexiber - Rust pub type Result<T> = Result<T, Error>;
Expand description
Result type.
+Result in flexiber - Rust pub type Result<T> = Result<T, Error>;
Expand description
Result type.
Aliased Type§
enum Result<T> {
Ok(T),
Err(Error),
diff --git a/flexiber/type.TaggedSlice.html b/flexiber/type.TaggedSlice.html
index ec64b32..9ba935b 100644
--- a/flexiber/type.TaggedSlice.html
+++ b/flexiber/type.TaggedSlice.html
@@ -1,4 +1,4 @@
-TaggedSlice in flexiber - Rust pub type TaggedSlice<'a, T = Tag> = TaggedValue<Slice<'a>, T>;
Expand description
Raw BER-TLV data object TaggedValue<Slice<'_>>.
+TaggedSlice in flexiber - Rust pub type TaggedSlice<'a, T = Tag> = TaggedValue<Slice<'a>, T>;
Expand description
Raw BER-TLV data object TaggedValue<Slice<'_>>.
Aliased Type§
struct TaggedSlice<'a, T = Tag> { /* private fields */ }
Implementations§
Source§impl<'a, T> TaggedSlice<'a, T>where
T: Copy,
Sourcepub fn from(tag: T, slice: &'a [u8]) -> Result<Self>
Create a new tagged slice, checking lengths.
Sourcepub fn as_bytes(&self) -> &'a [u8]
Borrow the inner byte slice.
diff --git a/flexiber_derive/all.html b/flexiber_derive/all.html
index 47910d2..b1401f8 100644
--- a/flexiber_derive/all.html
+++ b/flexiber_derive/all.html
@@ -1 +1 @@
-List of all items in this crate
\ No newline at end of file
+List of all items in this crate
\ No newline at end of file
diff --git a/flexiber_derive/derive.Decodable.html b/flexiber_derive/derive.Decodable.html
index 3c2246c..428fa1c 100644
--- a/flexiber_derive/derive.Decodable.html
+++ b/flexiber_derive/derive.Decodable.html
@@ -1,4 +1,4 @@
-Decodable in flexiber_derive - Rust #[derive(Decodable)]
+Decodable in flexiber_derive - Rust #[derive(Decodable)]
{
// Attributes available to this derive:
#[tlv]
diff --git a/flexiber_derive/derive.Encodable.html b/flexiber_derive/derive.Encodable.html
index 63d0aaf..ae19dae 100644
--- a/flexiber_derive/derive.Encodable.html
+++ b/flexiber_derive/derive.Encodable.html
@@ -1,4 +1,4 @@
-Encodable in flexiber_derive - Rust #[derive(Encodable)]
+Encodable in flexiber_derive - Rust #[derive(Encodable)]
{
// Attributes available to this derive:
#[tlv]
diff --git a/flexiber_derive/index.html b/flexiber_derive/index.html
index 81f50be..99844b6 100644
--- a/flexiber_derive/index.html
+++ b/flexiber_derive/index.html
@@ -1,4 +1,4 @@
-flexiber_derive - Rust Expand description
Custom derive support for the flexiber crate
+flexiber_derive - Rust Expand description
Custom derive support for the flexiber crate
With #[tlv(slice)] set, Encodable should work for fields implementing AsRef<[u8]>,
and Decodable should work for fields implementing TryFrom<[u8]>, even if the field
is not Decodable or Encodable.