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
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for LDAPOperation
impl Send for LDAPOperation
impl Sync for LDAPOperation
impl Unpin for LDAPOperation
impl UnwindSafe for LDAPOperation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more