pub struct Client { /* private fields */ }
Implementations§
Source§impl Client
impl Client
pub fn new(opts: ClientOptions) -> Self
pub fn get_idle_timeout(&self) -> &Duration
pub fn set_idle_timeout(&mut self, timeout: Duration)
pub fn set_some_idle_timeout(&mut self, timeout: Option<Duration>)
pub fn with_idle_timeout(self, timeout: Duration) -> Self
pub fn with_some_idle_timeout(self, timeout: Option<Duration>) -> Self
Sourcepub fn capabilities(&self) -> &Vec1<Capability<'static>>
pub fn capabilities(&self) -> &Vec1<Capability<'static>>
Returns the server capabilities.
This function does not fetch capabilities from server, it
just returns capabilities saved during the creation of this
client (using [Client::insecure
], [Client::tls
] or
[Client::starttls
]).
Sourcepub fn capabilities_iter(
&self,
) -> impl Iterator<Item = &Capability<'static>> + '_
pub fn capabilities_iter( &self, ) -> impl Iterator<Item = &Capability<'static>> + '_
Returns the server capabilities, as an iterator.
Same as Client::capabilities
, but just returns an iterator
instead.
Sourcepub fn supported_auth_mechanisms(
&self,
) -> impl Iterator<Item = &AuthMechanism<'static>> + '_
pub fn supported_auth_mechanisms( &self, ) -> impl Iterator<Item = &AuthMechanism<'static>> + '_
Returns supported authentication mechanisms, as an iterator.
Sourcepub fn supports_auth_mechanism(&self, mechanism: AuthMechanism<'static>) -> bool
pub fn supports_auth_mechanism(&self, mechanism: AuthMechanism<'static>) -> bool
Returns true
if the given authentication mechanism is
supported by the server.
Sourcepub fn login_supported(&self) -> bool
pub fn login_supported(&self) -> bool
Returns true
if LOGIN
is supported by the server.
Sourcepub fn ext_enable_supported(&self) -> bool
pub fn ext_enable_supported(&self) -> bool
Returns true
if the ENABLE
extension is supported by the
server.
Sourcepub fn ext_sasl_ir_supported(&self) -> bool
pub fn ext_sasl_ir_supported(&self) -> bool
Returns true
if the SASL-IR
extension is supported by the
server.
Sourcepub fn ext_id_supported(&self) -> bool
pub fn ext_id_supported(&self) -> bool
Returns true
if the ID
extension is supported by the
server.
Sourcepub fn ext_uidplus_supported(&self) -> bool
pub fn ext_uidplus_supported(&self) -> bool
Returns true
if the UIDPLUS
extension is supported by the
server.
Sourcepub fn ext_sort_supported(&self) -> bool
pub fn ext_sort_supported(&self) -> bool
Returns true
if the SORT
extension is supported by the
server.
Sourcepub fn ext_thread_supported(&self) -> bool
pub fn ext_thread_supported(&self) -> bool
Returns true
if the THREAD
extension is supported by the
server.
Sourcepub fn ext_idle_supported(&self) -> bool
pub fn ext_idle_supported(&self) -> bool
Returns true
if the IDLE
extension is supported by the
server.
Sourcepub fn ext_binary_supported(&self) -> bool
pub fn ext_binary_supported(&self) -> bool
Returns true
if the BINARY
extension is supported by the
server.
Sourcepub fn ext_move_supported(&self) -> bool
pub fn ext_move_supported(&self) -> bool
Returns true
if the MOVE
extension is supported by the
server.