pub struct TestConnectionBuilder { /* private fields */ }
Expand description
A builder for milter test connections.
Implementations§
Source§impl TestConnectionBuilder
impl TestConnectionBuilder
Sourcepub fn read_timeout(self, value: Duration) -> Self
pub fn read_timeout(self, value: Duration) -> Self
Configures the read timeout duration.
Sourcepub fn write_timeout(self, value: Duration) -> Self
pub fn write_timeout(self, value: Duration) -> Self
Configures the write timeout duration.
Sourcepub fn protocol_version(self, value: Version) -> Self
pub fn protocol_version(self, value: Version) -> Self
Configures the milter protocol version to advertise to the milter.
Sourcepub fn available_actions(self, value: Actions) -> Self
pub fn available_actions(self, value: Actions) -> Self
Configures the milter actions to advertise to the milter.
Sourcepub fn available_opts(self, value: ProtoOpts) -> Self
pub fn available_opts(self, value: ProtoOpts) -> Self
Configures the milter protocol options to advertise to the milter.
Sourcepub fn exact_leading_space(self, value: bool) -> Self
pub fn exact_leading_space(self, value: bool) -> Self
Instructs the test connection to treat leading whitespace in header values exactly as given.
Sourcepub async fn open_tcp(
self,
addr: impl ToSocketAddrs,
) -> TestResult<TestConnection>
pub async fn open_tcp( self, addr: impl ToSocketAddrs, ) -> TestResult<TestConnection>
Opens and negotiates a test connection to the given TCP socket.
Sourcepub async fn open_unix(
self,
addr: impl AsRef<Path>,
) -> TestResult<TestConnection>
pub async fn open_unix( self, addr: impl AsRef<Path>, ) -> TestResult<TestConnection>
Opens and negotiates a test connection to the given UNIX domain socket.
Only available on UNIX platforms.
Trait Implementations§
Source§impl Clone for TestConnectionBuilder
impl Clone for TestConnectionBuilder
Source§fn clone(&self) -> TestConnectionBuilder
fn clone(&self) -> TestConnectionBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for TestConnectionBuilder
impl RefUnwindSafe for TestConnectionBuilder
impl Send for TestConnectionBuilder
impl Sync for TestConnectionBuilder
impl Unpin for TestConnectionBuilder
impl UnwindSafe for TestConnectionBuilder
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