pub struct Database<'a>(_);
Available on crate feature
db
only.Expand description
A query interface for OIDs/Names.
Implementations§
source§impl<'a> Database<'a>
impl<'a> Database<'a>
sourcepub fn resolve<'b>(&self, oid: &'b str) -> Result<&'b str, Error>where
'a: 'b,
pub fn resolve<'b>(&self, oid: &'b str) -> Result<&'b str, Error>where 'a: 'b,
Looks up a name for an OID.
Errors if the input is not a valid OID. Returns the input if no name is found.
sourcepub const fn by_oid(&self, oid: &ObjectIdentifier) -> Option<&'a str>
pub const fn by_oid(&self, oid: &ObjectIdentifier) -> Option<&'a str>
Finds a named oid by its associated OID.
sourcepub const fn by_name(&self, name: &str) -> Option<&'a ObjectIdentifier>
pub const fn by_name(&self, name: &str) -> Option<&'a ObjectIdentifier>
Finds a named oid by its associated name.