imap_state.rs (365B)
1 use imap::Session; 2 use relm4::SharedState; 3 use rustls_connector::TlsStream; 4 use std::net::TcpStream; 5 6 pub enum ImapSession { 7 TLS(Session<TlsStream<TcpStream>>), 8 TCP(Session<TcpStream>), 9 None, 10 } 11 12 impl Default for ImapSession { 13 fn default() -> Self { 14 Self::None 15 } 16 } 17 18 pub static IMAP_SESSION: SharedState<ImapSession> = SharedState::new();