pub(crate) struct Client {
inner: Client<Box<dyn SessionStream>>,
}
Fields§
§inner: Client<Box<dyn SessionStream>>
Implementations§
source§impl Client
impl Client
fn new(stream: Box<dyn SessionStream>) -> Self
pub(crate) async fn login( self, username: &str, password: &str ) -> Result<Session>
pub(crate) async fn authenticate( self, auth_type: &str, authenticator: impl Authenticator ) -> Result<Session>
pub async fn connect_secure( context: &Context, hostname: &str, port: u16, strict_tls: bool ) -> Result<Self>
pub async fn connect_insecure( context: &Context, hostname: &str, port: u16 ) -> Result<Self>
pub async fn connect_starttls( context: &Context, hostname: &str, port: u16, strict_tls: bool ) -> Result<Self>
pub async fn connect_secure_socks5( context: &Context, domain: &str, port: u16, strict_tls: bool, socks5_config: Socks5Config ) -> Result<Self>
pub async fn connect_insecure_socks5( context: &Context, domain: &str, port: u16, socks5_config: Socks5Config ) -> Result<Self>
pub async fn connect_starttls_socks5( context: &Context, hostname: &str, port: u16, socks5_config: Socks5Config, strict_tls: bool ) -> Result<Self>
Methods from Deref<Target = Connection<T>>§
pub async fn read_response(&mut self) -> Option<Result<ResponseData, Error>>
pub async fn read_response(&mut self) -> Option<Result<ResponseData, Error>>
Read the next response on the connection.
pub async fn run_command_and_check_ok(
&mut self,
command: &str,
unsolicited: Option<Sender<UnsolicitedResponse>>
) -> Result<(), Error>
pub async fn run_command_and_check_ok( &mut self, command: &str, unsolicited: Option<Sender<UnsolicitedResponse>> ) -> Result<(), Error>
Execute a command and check that the next response is a matching done.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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