pub struct Control {
pub oid: String,
pub critical: bool,
pub value: Option<Vec<u8>>,
}Fields§
§oid: String§critical: bool§value: Option<Vec<u8>>Implementations§
Source§impl Control
impl Control
pub fn new<C>(control: &C, critical: bool) -> Controlwhere
C: RequestControl,
pub fn decode<C>(&self) -> Result<C, ProtoError>where
C: ResponseControl,
Sourcepub fn find<C>(controls: &[Control]) -> Result<Option<C>, ProtoError>where
C: ResponseControl,
pub fn find<C>(controls: &[Control]) -> Result<Option<C>, ProtoError>where
C: ResponseControl,
The decoded control with OID C::OID, if the server sent one. A
control that is present and does not decode is an error.
Trait Implementations§
impl Eq for Control
impl StructuralPartialEq for Control
Auto Trait Implementations§
impl Forget for Control
impl Freeze for Control
impl Move for Control
impl RefUnwindSafe for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnsafeUnpin for Control
impl UnwindSafe for Control
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