pub struct Client { /* private fields */ }
Expand description
A milter client using some options and a codec to talk to a milter server
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(options: OptNeg) -> Self
pub fn new(options: OptNeg) -> Self
Create a client which is able to handle connections with the provided options.
Sourcepub async fn connect_via<RW: AsyncRead + AsyncWrite + Unpin>(
&self,
connection: RW,
) -> Result<Connection<RW>, ResponseError>
pub async fn connect_via<RW: AsyncRead + AsyncWrite + Unpin>( &self, connection: RW, ) -> Result<Connection<RW>, ResponseError>
Handle a single milter connection via the provided RW connection
§Errors
This fails if an io-error is experienced or option negotiation fails
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more