Trait rasn::types::AsnType

source ·
pub trait AsnType {
    const TAG: Tag;
    const TAG_TREE: TagTree = _;
    const CONSTRAINTS: Constraints<'static> = Constraints::NONE;
    const IDENTIFIER: Option<&'static str> = None;
}
Expand description

A trait representing any type that can represented in ASN.1.

Required Associated Constants§

source

const TAG: Tag

The associated tag for the type.

Note When implementing CHOICE types, this should be set to Tag::EOC and instead set the Self::TAG_TREE constant to contain all variants.

Provided Associated Constants§

source

const TAG_TREE: TagTree = _

The root of this type’s tree of tag’s if it a CHOICE type, otherwise its Leaf that points Self::TAG.

source

const CONSTRAINTS: Constraints<'static> = Constraints::NONE

source

const IDENTIFIER: Option<&'static str> = None

Identifier of an ASN.1 type as specified in the original specification if not identical with the identifier of Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AsnType for &str

source§

const TAG: Tag = Tag::UTF8_STRING

source§

impl AsnType for bool

source§

const TAG: Tag = Tag::BOOL

source§

impl AsnType for i8

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for i16

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for i32

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for i64

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for i128

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for isize

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for str

source§

const TAG: Tag = Tag::UTF8_STRING

source§

impl AsnType for u8

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for u16

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for u32

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for u64

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for u128

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl AsnType for ()

source§

const TAG: Tag = Tag::NULL

source§

impl AsnType for usize

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl<T> AsnType for &[T]

source§

const TAG: Tag = Tag::SEQUENCE

source§

impl<T> AsnType for BTreeSet<T>

source§

const TAG: Tag = Tag::SET

source§

impl<T: AsnType> AsnType for Option<T>

source§

const TAG: Tag = T::TAG

source§

const TAG_TREE: TagTree = T::TAG_TREE

source§

impl<T: AsnType> AsnType for &T

source§

const TAG: Tag = T::TAG

source§

const TAG_TREE: TagTree = T::TAG_TREE

source§

impl<T: AsnType> AsnType for Box<T>

source§

const TAG: Tag = T::TAG

source§

const TAG_TREE: TagTree = T::TAG_TREE

source§

impl<T: AsnType> AsnType for Vec<T>

source§

const TAG: Tag = Tag::SEQUENCE

source§

impl<T: AsnType, const N: usize> AsnType for [T; N]

source§

const TAG: Tag = Tag::SEQUENCE

source§

const CONSTRAINTS: Constraints<'static> = _

Implementors§

source§

impl AsnType for Open

source§

const TAG: Tag = { crate::Tag::EOC }

source§

const TAG_TREE: TagTree = _

source§

impl AsnType for Any

source§

const TAG: Tag = Tag::EOC

source§

const TAG_TREE: TagTree = _

source§

impl AsnType for BmpString

source§

const TAG: Tag = Tag::BMP_STRING

source§

impl AsnType for GeneralString

source§

const TAG: Tag = Tag::GENERAL_STRING

source§

impl AsnType for Ia5String

source§

const TAG: Tag = Tag::IA5_STRING

source§

impl AsnType for Integer

source§

const TAG: Tag = Tag::INTEGER

source§

impl AsnType for NumericString

source§

const TAG: Tag = Tag::NUMERIC_STRING

source§

impl AsnType for ObjectIdentifier

source§

const TAG: Tag = Tag::OBJECT_IDENTIFIER

source§

impl AsnType for OctetString

source§

const TAG: Tag = Tag::OCTET_STRING

source§

impl AsnType for Oid

source§

const TAG: Tag = Tag::OBJECT_IDENTIFIER

source§

impl AsnType for PrintableString

source§

const TAG: Tag = Tag::PRINTABLE_STRING

source§

impl AsnType for TeletexString

source§

const TAG: Tag = Tag::TELETEX_STRING

source§

impl AsnType for Utf8String

source§

const TAG: Tag = Tag::UTF8_STRING

source§

impl AsnType for VisibleString

source§

const TAG: Tag = Tag::VISIBLE_STRING

source§

impl AsnType for BitStr

source§

const TAG: Tag = Tag::BIT_STRING

source§

impl AsnType for BitString

source§

const TAG: Tag = Tag::BIT_STRING

source§

impl AsnType for GeneralizedTime

source§

const TAG: Tag = Tag::GENERALIZED_TIME

source§

impl AsnType for UtcTime

source§

const TAG: Tag = Tag::UTC_TIME

source§

impl<T> AsnType for InstanceOf<T>

source§

const TAG: Tag = Tag::EXTERNAL

source§

impl<T: AsnType, V> AsnType for Explicit<T, V>

source§

const TAG: Tag = T::TAG

source§

impl<T: AsnType, V> AsnType for Implicit<T, V>

source§

const TAG: Tag = T::TAG

source§

impl<const N: usize> AsnType for FixedOctetString<N>

source§

const TAG: Tag = Tag::OCTET_STRING

source§

const CONSTRAINTS: Constraints<'static> = _

source§

impl<const N: usize> AsnType for FixedBitString<N>

source§

const TAG: Tag = Tag::BIT_STRING

source§

impl<const START: i128, const END: i128> AsnType for ConstrainedInteger<START, END>

source§

const TAG: Tag = Tag::INTEGER

source§

const CONSTRAINTS: Constraints<'static> = _