pub struct JmapSessionGet { /* private fields */ }Expand description
I/O-free coroutine to fetch a JMAP session (RFC 8620 §2).
If url has a non-root path (e.g.
https://api.fastmail.com/jmap/session/), GETs that path directly
as the session endpoint. Otherwise GETs /.well-known/jmap for
automatic discovery.
When the server responds with a 3xx redirect, the coroutine yields
JmapRedirectYield::WantsRedirect. The caller is responsible for
opening a new connection and retrying with a new coroutine.
Implementations§
Source§impl JmapSessionGet
impl JmapSessionGet
Sourcepub fn new(http_auth: &SecretString, url: &Url) -> Self
pub fn new(http_auth: &SecretString, url: &Url) -> Self
url is either a base URL for discovery (https://mail.example.com,
triggering GET /.well-known/jmap) or a direct session endpoint
(https://api.example.com/jmap/session/, used as-is).
Trait Implementations§
Source§impl JmapCoroutine for JmapSessionGet
impl JmapCoroutine for JmapSessionGet
Source§type Yield = JmapRedirectYield
type Yield = JmapRedirectYield
Intermediate value handed back on every step.
Source§type Return = Result<JmapSessionGetOutput, JmapSessionGetError>
type Return = Result<JmapSessionGetOutput, JmapSessionGetError>
Terminal value. By convention
Result<Output, Error>.Auto Trait Implementations§
impl Freeze for JmapSessionGet
impl RefUnwindSafe for JmapSessionGet
impl Send for JmapSessionGet
impl Sync for JmapSessionGet
impl Unpin for JmapSessionGet
impl UnsafeUnpin for JmapSessionGet
impl UnwindSafe for JmapSessionGet
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