From 2275e681c2afe8ea13f1c8de1b4da79b65a6c7c5 Mon Sep 17 00:00:00 2001 From: Nathaniel McCallum Date: Mon, 7 Mar 2022 16:18:09 -0500 Subject: [PATCH] feat(const-oid): add the AssociatedOid trait Signed-off-by: Nathaniel McCallum --- const-oid/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/const-oid/src/lib.rs b/const-oid/src/lib.rs index 6b7bdd009..62258cc08 100644 --- a/const-oid/src/lib.rs +++ b/const-oid/src/lib.rs @@ -29,6 +29,12 @@ pub use crate::{ use crate::encoder::Encoder; use core::{fmt, str::FromStr}; +/// A trait which associates an OID with a type. +pub trait AssociatedOid { + /// The OID associated with this type. + const OID: ObjectIdentifier; +} + /// Object identifier (OID). /// /// OIDs are hierarchical structures consisting of "arcs", i.e. integer