Enum ldap_types::basic::LDAPOperation
source · [−]pub enum LDAPOperation {
Add(LDAPEntry),
Delete {
dn: String,
},
Modify {
dn: String,
mods: Vec<Mod<String>>,
bin_mods: Vec<Mod<Vec<u8>>>,
},
}
Expand description
an operation to perform to turn one LDAP object into another. we purposefully only include operations here that operate without moving the object to a different DN
Variants
Add(LDAPEntry)
add a new entry
Delete
Fields
dn: String
the DN of the entry to delete
delete an existing entry
Modify
Fields
dn: String
the DN of the entry to modify
modify attributes of an existing entry
Implementations
sourceimpl LDAPOperation
impl LDAPOperation
sourcepub fn as_add_mut(&mut self) -> Option<&mut LDAPEntry>
pub fn as_add_mut(&mut self) -> Option<&mut LDAPEntry>
Optionally returns mutable references to the inner fields if this is a LDAPOperation::Add
, otherwise None
sourcepub fn as_add(&self) -> Option<&LDAPEntry>
pub fn as_add(&self) -> Option<&LDAPEntry>
Optionally returns references to the inner fields if this is a LDAPOperation::Add
, otherwise None
sourcepub fn into_add(self) -> Result<LDAPEntry, Self>
pub fn into_add(self) -> Result<LDAPEntry, Self>
Returns the inner fields if this is a LDAPOperation::Add
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_delete_mut(&mut self) -> Option<&mut String>
pub fn as_delete_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a LDAPOperation::Delete
, otherwise None
sourcepub fn as_delete(&self) -> Option<&String>
pub fn as_delete(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a LDAPOperation::Delete
, otherwise None
sourcepub fn into_delete(self) -> Result<String, Self>
pub fn into_delete(self) -> Result<String, Self>
Returns the inner fields if this is a LDAPOperation::Delete
, otherwise returns back the enum in the Err
case of the result
sourcepub fn as_modify_mut(
&mut self
) -> Option<(&mut String, &mut Vec<Mod<String>>, &mut Vec<Mod<Vec<u8>>>)>
pub fn as_modify_mut(
&mut self
) -> Option<(&mut String, &mut Vec<Mod<String>>, &mut Vec<Mod<Vec<u8>>>)>
Optionally returns mutable references to the inner fields if this is a LDAPOperation::Modify
, otherwise None
sourceimpl LDAPOperation
impl LDAPOperation
sourcepub fn operation_apply_cmp(&self, other: &Self) -> Option<Ordering>
pub fn operation_apply_cmp(&self, other: &Self) -> Option<Ordering>
Used to order operations so parents are added first and children deleted first
Trait Implementations
sourceimpl Clone for LDAPOperation
impl Clone for LDAPOperation
sourcefn clone(&self) -> LDAPOperation
fn clone(&self) -> LDAPOperation
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more