pub struct OptNeg {
pub version: u32,
pub capabilities: Capability,
pub protocol: Protocol,
pub macro_stages: MacroStages,
}
Expand description
SMFIC_OPTNEG
Fields§
§version: u32
The milter protocol version this implementation speaks
capabilities: Capability
Which modifications this milter may send to the client
protocol: Protocol
How the client should behave using this protocol
macro_stages: MacroStages
Which macros this milter would like to get from the client
Implementations§
Source§impl OptNeg
impl OptNeg
Sourcepub fn merge_compatible(self, other: &Self) -> Result<Self, CompatibilityError>
pub fn merge_compatible(self, other: &Self) -> Result<Self, CompatibilityError>
Check whether self
is compatible with other
This includes comparing versions, the protocol and capabilities.
§Errors
This errors when discovering an incompatibility between self
and other
Trait Implementations§
Source§impl From<OptNeg> for ClientCommand
impl From<OptNeg> for ClientCommand
Source§impl From<OptNeg> for ClientMessage
impl From<OptNeg> for ClientMessage
Source§fn from(v: OptNeg) -> ClientMessage
fn from(v: OptNeg) -> ClientMessage
Converts to this type from the input type.
Source§impl From<OptNeg> for ServerCommand
impl From<OptNeg> for ServerCommand
Source§impl From<OptNeg> for ServerMessage
impl From<OptNeg> for ServerMessage
Source§fn from(v: OptNeg) -> ServerMessage
fn from(v: OptNeg) -> ServerMessage
Converts to this type from the input type.
Source§impl TryInto<OptNeg> for ClientMessage
impl TryInto<OptNeg> for ClientMessage
Source§impl TryInto<OptNeg> for ServerMessage
impl TryInto<OptNeg> for ServerMessage
Source§impl Writable for OptNeg
impl Writable for OptNeg
Source§fn len(&self) -> usize
fn len(&self) -> usize
Byte-length that would be written if
Self::write
is calledSource§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Whether a call to
Self::write
would write somethingimpl StructuralPartialEq for OptNeg
Auto Trait Implementations§
impl Freeze for OptNeg
impl RefUnwindSafe for OptNeg
impl Send for OptNeg
impl Sync for OptNeg
impl Unpin for OptNeg
impl UnwindSafe for OptNeg
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