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

§mods: Vec<Mod<String>>

the modifications to textual attributes to perform

§bin_mods: Vec<Mod<Vec<u8>>>

the modifications to binary attributes to perform

modify attributes of an existing entry

Implementations§

source§

impl LDAPOperation

source

pub fn is_add(&self) -> bool

Returns true if this is a LDAPOperation::Add, otherwise false

source

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

source

pub fn as_add(&self) -> Option<&LDAPEntry>

Optionally returns references to the inner fields if this is a LDAPOperation::Add, otherwise None

source

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

source

pub fn is_delete(&self) -> bool

Returns true if this is a LDAPOperation::Delete, otherwise false

source

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

source

pub fn as_delete(&self) -> Option<&String>

Optionally returns references to the inner fields if this is a LDAPOperation::Delete, otherwise None

source

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

source

pub fn is_modify(&self) -> bool

Returns true if this is a LDAPOperation::Modify, otherwise false

source

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

pub fn as_modify( &self ) -> Option<(&String, &Vec<Mod<String>>, &Vec<Mod<Vec<u8>>>)>

Optionally returns references to the inner fields if this is a LDAPOperation::Modify, otherwise None

source

pub fn into_modify( self ) -> Result<(String, Vec<Mod<String>>, Vec<Mod<Vec<u8>>>), Self>

Returns the inner fields if this is a LDAPOperation::Modify, otherwise returns back the enum in the Err case of the result

source§

impl LDAPOperation

source

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

source§

fn clone(&self) -> LDAPOperation

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LDAPOperation

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Chain<T> for T

source§

fn len(&self) -> usize

The number of items that this chain link consists of.
source§

fn append_to(self, v: &mut Vec<T>)

Append the elements in this link to the chain.
source§

impl<T> Container<T> for T
where T: Clone,

§

type Iter = Once<T>

An iterator over the items within this container, by value.
source§

fn get_iter(&self) -> <T as Container<T>>::Iter

Iterate over the elements of the container (using internal iteration because GATs are unstable).
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
source§

impl<T> OrderedContainer<T> for T
where T: Clone,