pub struct Database<'a>(/* private fields */);
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.
sourcepub const fn find_names_for_oid(&self, oid: ObjectIdentifier) -> Names<'a> ⓘ
pub const fn find_names_for_oid(&self, oid: ObjectIdentifier) -> Names<'a> ⓘ
Return the list of matched name for the OID.
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Database<'a>
impl<'a> Send for Database<'a>
impl<'a> Sync for Database<'a>
impl<'a> Unpin for Database<'a>
impl<'a> UnwindSafe for Database<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more