synta 0.2.0

ASN.1 parser, decoder, and encoder library with DER/BER support and C FFI
Documentation
//! ASN.1 type definitions.
//!
//! This module contains all concrete ASN.1 type implementations and
//! re-exports the most commonly used ones at the `synta` crate root.
//!
//! ## SEQUENCE OF / SET OF variants
//!
//! Two families of SEQUENCE OF / SET OF types are available:
//!
//! | Export               | Source module | Description |
//! |----------------------|---------------|-------------|
//! | [`SequenceOf<T>`]    | `sequenceof`  | Lazy zero-copy iterator; elements decoded on demand |
//! | [`SetOf<T>`]         | `sequenceof`  | Type alias for `SequenceOf` (same SEQUENCE tag; no sort check) |
//! | [`SequenceOfVec<T>`] | `constructed` | Eager `Vec<T>`-backed SEQUENCE OF, all elements decoded at once |
//! | [`SetOfVec<T>`]      | `constructed` | Eager `Vec<T>`-backed SET OF, all elements decoded at once |
//!
//! Prefer the lazy `SequenceOf<T>` when parsing large structures or when you
//! only need a subset of the elements.  Use `SequenceOfVec<T>` when you
//! always need all elements collected into a `Vec<T>`.

pub mod constructed;
pub mod oid;
pub mod primitive;
pub mod raw;
pub mod sequenceof;
pub mod string;
pub mod tagged;
pub mod time;

// Re-export commonly used types
pub use constructed::{Element, Sequence, Set};
pub use raw::RawDer;
// Export old Vec-based versions with different names for compatibility
pub use constructed::{SequenceOf as SequenceOfVec, SetOf as SetOfVec};
// Export new lazy iterator versions
pub use oid::ObjectIdentifier;
pub use primitive::{Boolean, Enumerated, Integer, Null, Real};
pub use sequenceof::{SequenceOf, SetOf};
pub use string::{
    BitString, BitStringRef, BmpString, GeneralString, IA5String, IA5StringRef, NumericString,
    OctetString, OctetStringRef, PrintableString, PrintableStringRef, TeletexString,
    UniversalString, Utf8String, Utf8StringRef, VisibleString,
};
pub use tagged::{ExplicitTag, ImplicitTag};
pub use time::{GeneralizedTime, UtcTime};