pub struct JmapSession {
pub username: String,
pub accounts: BTreeMap<String, JmapAccountInfo>,
pub primary_accounts: BTreeMap<String, String>,
pub capabilities: BTreeMap<String, Value>,
pub api_url: Url,
pub download_url: String,
pub upload_url: String,
pub event_source_url: String,
pub state: String,
}Expand description
The JMAP session object returned by the well-known URL (RFC 8620 §2).
Fields§
§username: String§accounts: BTreeMap<String, JmapAccountInfo>§primary_accounts: BTreeMap<String, String>§capabilities: BTreeMap<String, Value>§api_url: Url§download_url: String§upload_url: String§event_source_url: String§state: StringImplementations§
Source§impl JmapSession
impl JmapSession
Sourcepub fn primary_account_id_for(&self, capability: &str) -> String
pub fn primary_account_id_for(&self, capability: &str) -> String
Returns the primary account ID for the given capability URN, or an empty string if none is advertised.
Trait Implementations§
Source§impl Clone for JmapSession
impl Clone for JmapSession
Source§fn clone(&self) -> JmapSession
fn clone(&self) -> JmapSession
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JmapSession
impl Debug for JmapSession
Source§impl<'de> Deserialize<'de> for JmapSession
impl<'de> Deserialize<'de> for JmapSession
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for JmapSession
impl RefUnwindSafe for JmapSession
impl Send for JmapSession
impl Sync for JmapSession
impl Unpin for JmapSession
impl UnsafeUnpin for JmapSession
impl UnwindSafe for JmapSession
Blanket Implementations§
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