pub struct Exop {
pub name: Option<String>,
pub val: Option<Vec<u8>>,
}
Expand description
Generic extended operation.
Since the same struct can be used both for requests and responses,
both fields must be declared as optional; when sending an extended
request, name
must not be None
.
Fields§
§name: Option<String>
OID of the operation. It may be absent in the response.
val: Option<Vec<u8>>
Request or response value. It may be absent in both cases.
Implementations§
Source§impl Exop
impl Exop
Sourcepub fn parse<T: ExopParser>(&self) -> T
pub fn parse<T: ExopParser>(&self) -> T
Parse the generic exop into a exop-specific struct.
The parser will panic if the value is None
. See
control parsing,
which behaves analogously, for discussion and rationale.
Trait Implementations§
Source§impl<'a> From<PasswordModify<'a>> for Exop
impl<'a> From<PasswordModify<'a>> for Exop
Source§fn from(pm: PasswordModify<'a>) -> Exop
fn from(pm: PasswordModify<'a>) -> Exop
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Exop
impl RefUnwindSafe for Exop
impl Send for Exop
impl Sync for Exop
impl Unpin for Exop
impl UnwindSafe for Exop
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more