Enum ldap_types::basic::KeyStringOrOID
source · pub enum KeyStringOrOID {
KeyString(KeyString),
OID(ObjectIdentifier),
}
Expand description
LDAP allows the use of either a keystring or an OID in many locations, e.g. in DNs or in the schema
Variants§
KeyString(KeyString)
this represents a KeyString
OID(ObjectIdentifier)
this reprents an ObjectIdentifier
Implementations§
source§impl KeyStringOrOID
impl KeyStringOrOID
sourcepub fn is_key_string(&self) -> bool
pub fn is_key_string(&self) -> bool
Returns true if this is a KeyStringOrOID::KeyString
, otherwise false
sourcepub fn as_key_string_mut(&mut self) -> Option<&mut KeyString>
pub fn as_key_string_mut(&mut self) -> Option<&mut KeyString>
Optionally returns mutable references to the inner fields if this is a KeyStringOrOID::KeyString
, otherwise None
sourcepub fn as_key_string(&self) -> Option<&KeyString>
pub fn as_key_string(&self) -> Option<&KeyString>
Optionally returns references to the inner fields if this is a KeyStringOrOID::KeyString
, otherwise None
sourcepub fn into_key_string(self) -> Result<KeyString, Self>
pub fn into_key_string(self) -> Result<KeyString, Self>
Returns the inner fields if this is a KeyStringOrOID::KeyString
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_oid_mut(&mut self) -> Option<&mut ObjectIdentifier>
pub fn as_oid_mut(&mut self) -> Option<&mut ObjectIdentifier>
Optionally returns mutable references to the inner fields if this is a KeyStringOrOID::OID
, otherwise None
sourcepub fn as_oid(&self) -> Option<&ObjectIdentifier>
pub fn as_oid(&self) -> Option<&ObjectIdentifier>
Optionally returns references to the inner fields if this is a KeyStringOrOID::OID
, otherwise None
sourcepub fn into_oid(self) -> Result<ObjectIdentifier, Self>
pub fn into_oid(self) -> Result<ObjectIdentifier, Self>
Returns the inner fields if this is a KeyStringOrOID::OID
, otherwise returns back the enum in the Err
case of the result
Trait Implementations§
source§impl Clone for KeyStringOrOID
impl Clone for KeyStringOrOID
source§fn clone(&self) -> KeyStringOrOID
fn clone(&self) -> KeyStringOrOID
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for KeyStringOrOID
impl Debug for KeyStringOrOID
source§impl<'de> Deserialize<'de> for KeyStringOrOID
impl<'de> Deserialize<'de> for KeyStringOrOID
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Display for KeyStringOrOID
impl Display for KeyStringOrOID
source§impl From<&KeyString> for KeyStringOrOID
impl From<&KeyString> for KeyStringOrOID
source§impl From<&KeyStringOrOID> for KeyStringOrOID
impl From<&KeyStringOrOID> for KeyStringOrOID
source§fn from(value: &KeyStringOrOID) -> Self
fn from(value: &KeyStringOrOID) -> Self
source§impl From<&ObjectIdentifier> for KeyStringOrOID
impl From<&ObjectIdentifier> for KeyStringOrOID
source§fn from(value: &ObjectIdentifier) -> Self
fn from(value: &ObjectIdentifier) -> Self
source§impl From<KeyString> for KeyStringOrOID
impl From<KeyString> for KeyStringOrOID
source§impl From<ObjectIdentifier> for KeyStringOrOID
impl From<ObjectIdentifier> for KeyStringOrOID
source§fn from(value: ObjectIdentifier) -> Self
fn from(value: ObjectIdentifier) -> Self
source§impl FromStr for KeyStringOrOID
impl FromStr for KeyStringOrOID
source§impl Hash for KeyStringOrOID
impl Hash for KeyStringOrOID
source§impl Ord for KeyStringOrOID
impl Ord for KeyStringOrOID
source§impl PartialEq for KeyStringOrOID
impl PartialEq for KeyStringOrOID
source§impl PartialOrd for KeyStringOrOID
impl PartialOrd for KeyStringOrOID
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more