pub struct JmapSend { /* private fields */ }Expand description
I/O-free coroutine sending one JMAP API request and parsing its response.
Implementations§
Source§impl JmapSend
impl JmapSend
Sourcepub fn new(
http_auth: &SecretString,
api_url: &Url,
request: JmapRequest,
) -> Result<Self, JmapSendError>
pub fn new( http_auth: &SecretString, api_url: &Url, request: JmapRequest, ) -> Result<Self, JmapSendError>
Serialises request as JSON and builds an HTTP POST to api_url
with the bearer token from http_auth.
Trait Implementations§
Source§impl JmapCoroutine for JmapSend
impl JmapCoroutine for JmapSend
Source§type Return = Result<JmapSendOutput, JmapSendError>
type Return = Result<JmapSendOutput, JmapSendError>
Terminal value. By convention
Result<Output, Error>.Auto Trait Implementations§
impl Freeze for JmapSend
impl RefUnwindSafe for JmapSend
impl Send for JmapSend
impl Sync for JmapSend
impl Unpin for JmapSend
impl UnsafeUnpin for JmapSend
impl UnwindSafe for JmapSend
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