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<ImapSession<Box<dyn SessionStream>>>
pub(crate) async fn authenticate( self, auth_type: &str, authenticator: impl Authenticator, ) -> Result<ImapSession<Box<dyn SessionStream>>>
async fn connection_attempt( context: Context, host: String, security: ConnectionSecurity, resolved_addr: SocketAddr, strict_tls: bool, ) -> Result<Self>
pub async fn connect( context: &Context, proxy_config: Option<ProxyConfig>, strict_tls: bool, candidate: ConnectionCandidate, ) -> Result<Self>
async fn connect_secure( addr: SocketAddr, hostname: &str, strict_tls: bool, ) -> Result<Self>
async fn connect_insecure(addr: SocketAddr) -> Result<Self>
async fn connect_starttls( addr: SocketAddr, host: &str, strict_tls: bool, ) -> Result<Self>
async fn connect_secure_proxy( context: &Context, domain: &str, port: u16, strict_tls: bool, proxy_config: ProxyConfig, ) -> Result<Self>
async fn connect_insecure_proxy( context: &Context, domain: &str, port: u16, proxy_config: ProxyConfig, ) -> Result<Self>
async fn connect_starttls_proxy( context: &Context, hostname: &str, port: u16, proxy_config: ProxyConfig, 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 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§
§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