[−][src]Struct ldap3::controls::RawControl
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
ctype: String
OID of the control.
crit: bool
Criticality, has no meaning on response.
val: Option<Vec<u8>>
Raw value of the control, if any.
Implementations
impl RawControl
[src]
pub fn parse<T: ControlParser>(&self) -> T
[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,
if it proves necessary.
Trait Implementations
impl Clone for RawControl
[src]
fn clone(&self) -> RawControl
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for RawControl
[src]
impl<S: AsRef<str>> From<Assertion<S>> for RawControl
[src]
fn from(assn: Assertion<S>) -> RawControl
[src]
impl<T> From<CriticalControl<T>> for RawControl where
T: Into<RawControl>,
[src]
T: Into<RawControl>,
fn from(cc: CriticalControl<T>) -> RawControl
[src]
impl From<ManageDsaIt> for RawControl
[src]
fn from(_mdi: ManageDsaIt) -> RawControl
[src]
impl From<PagedResults> for RawControl
[src]
fn from(pr: PagedResults) -> RawControl
[src]
impl<S: AsRef<str>> From<PostRead<S>> for RawControl
[src]
fn from(pr: PostRead<S>) -> RawControl
[src]
impl<S: AsRef<str>> From<PreRead<S>> for RawControl
[src]
fn from(pr: PreRead<S>) -> RawControl
[src]
impl From<ProxyAuth> for RawControl
[src]
fn from(pa: ProxyAuth) -> RawControl
[src]
impl From<RelaxRules> for RawControl
[src]
fn from(_rr: RelaxRules) -> RawControl
[src]
impl From<SyncRequest> for RawControl
[src]
fn from(sr: SyncRequest) -> RawControl
[src]
Auto Trait Implementations
impl RefUnwindSafe for RawControl
impl Send for RawControl
impl Sync for RawControl
impl Unpin for RawControl
impl UnwindSafe for RawControl
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,