pub struct TcpConnector { /* private fields */ }Expand description
TCP Connectivity module for checking TCP connections
Implementations§
Source§impl TcpConnector
impl TcpConnector
Sourcepub fn with_timeout(timeout: Duration) -> Self
pub fn with_timeout(timeout: Duration) -> Self
Create a new TCP connector with a custom timeout
Sourcepub async fn check_port<A: Into<IpAddr>>(
&self,
host: A,
port: u16,
) -> Result<bool>
pub async fn check_port<A: Into<IpAddr>>( &self, host: A, port: u16, ) -> Result<bool>
Check if a TCP port is open on a host
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TcpConnector
impl RefUnwindSafe for TcpConnector
impl Send for TcpConnector
impl Sync for TcpConnector
impl Unpin for TcpConnector
impl UnwindSafe for TcpConnector
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