Skip to main content

JmapGet

Struct JmapGet 

Source
pub struct JmapGet<T> { /* private fields */ }
Expand description

Generic I/O-free coroutine for the JMAP Foo/get method (RFC 8620 §5.1).

Implementations§

Source§

impl<T: DeserializeOwned> JmapGet<T>

Source

pub fn new( account_id: String, http_auth: &SecretString, api_url: &Url, method: impl Into<String>, capabilities: Vec<String>, opts: JmapGetOptions, ) -> Result<Self, JmapGetError>

Builds a single-call Foo/get batch and wraps it in JmapSend.

Source

pub fn from_send(send: JmapSend) -> Self

Wraps a pre-built JmapSend (advanced: lets callers compose custom batches and still benefit from the typed response decode).

Trait Implementations§

Source§

impl<T: DeserializeOwned> JmapCoroutine for JmapGet<T>

Source§

type Yield = JmapYield

Intermediate value handed back on every step.
Source§

type Return = Result<JmapGetOutput<T>, JmapGetError>

Terminal value. By convention Result<Output, Error>.
Source§

fn resume( &mut self, arg: Option<&[u8]>, ) -> JmapCoroutineState<Self::Yield, Self::Return>

Advances the coroutine one step. Read more

Auto Trait Implementations§

§

impl<T> Freeze for JmapGet<T>

§

impl<T> RefUnwindSafe for JmapGet<T>
where T: RefUnwindSafe,

§

impl<T> Send for JmapGet<T>
where T: Send,

§

impl<T> Sync for JmapGet<T>
where T: Sync,

§

impl<T> Unpin for JmapGet<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for JmapGet<T>

§

impl<T> UnwindSafe for JmapGet<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.