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
delete an existing entry
Modify
Fields
modify attributes of an existing entry
Implementations§
source§impl 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 is_delete(&self) -> bool
pub fn is_delete(&self) -> bool
Returns true if this is a LDAPOperation::Delete
, otherwise false
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 is_modify(&self) -> bool
pub fn is_modify(&self) -> bool
Returns true if this is a LDAPOperation::Modify
, otherwise false
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
source§impl 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§
source§impl Clone for LDAPOperation
impl Clone for LDAPOperation
source§fn clone(&self) -> LDAPOperation
fn clone(&self) -> LDAPOperation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more