mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
17 lines
432 B
Rust
17 lines
432 B
Rust
use anyhow::Result;
|
|
use pimalaya_toolbox::stream::jmap::JmapSession;
|
|
|
|
use crate::{account::Account, config::JmapConfig};
|
|
|
|
pub type JmapAccount = Account<JmapConfig>;
|
|
|
|
impl JmapAccount {
|
|
pub fn new_jmap_session(&self) -> Result<JmapSession> {
|
|
JmapSession::new(
|
|
self.backend.server.clone(),
|
|
self.backend.tls.clone().try_into()?,
|
|
self.backend.auth.clone().try_into()?,
|
|
)
|
|
}
|
|
}
|