Struct ldap3::controls::RawControl [] [src]

pub struct RawControl {
    pub ctype: String,
    pub crit: bool,
    pub val: Option<Vec<u8>>,
}

Generic control.

This struct can be used both for request and response controls. For requests, an independently implemented control can produce an instance of this type and use it to provide an element of the vector passed to with_controls() by calling into() on the instance.

For responses, an instance is packed into a Control and can be parsed by calling type-qualified parse() on that instance, if a ControlParser implementation exists for the specified type.

Fields

OID of the control.

Criticality, has no meaning on response.

Raw value of the control, if any.

Methods

impl RawControl
[src]

Parse the generic control into a control-specific struct.

The parser will panic if the control value is None. Note: no control known to the author signals the lack of return value by omitting the control value, so this shouldn't be a problem in practice. Nevertheless, it should be possible to report this along with other parsing errors, which is a planned future improvement.

Trait Implementations

impl<S: AsRef<str>> From<Assertion<S>> for RawControl
[src]

Performs the conversion.

impl From<PagedResults> for RawControl
[src]

Performs the conversion.

impl From<ProxyAuth> for RawControl
[src]

Performs the conversion.

impl<S: AsRef<str>> From<PreRead<S>> for RawControl
[src]

Performs the conversion.

impl<S: AsRef<str>> From<PostRead<S>> for RawControl
[src]

Performs the conversion.

impl From<RelaxRules> for RawControl
[src]

Performs the conversion.

impl<T> From<CriticalControl<T>> for RawControl where
    T: Into<RawControl>, 
[src]

Performs the conversion.

impl Clone for RawControl
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for RawControl
[src]

Formats the value using the given formatter.