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: StringThe username associated with the credentials used to fetch the session.
accounts: BTreeMap<String, JmapAccountInfo>The accounts the user has access to, keyed by account id.
primary_accounts: BTreeMap<String, String>The primary account id per capability URN.
capabilities: BTreeMap<String, Value>The capabilities the server supports, keyed by capability URN.
api_url: UrlThe URL to POST JMAP API requests to.
download_url: StringThe blob download URL template (RFC 6570).
upload_url: StringThe blob upload URL template (RFC 6570).
event_source_url: StringThe URL of the event source push channel.
state: StringThe opaque server state; changes when the session object changes.
Implementations§
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