pub struct Invocation {
pub name: String,
pub arguments: Value,
pub call_id: String,
}Expand description
A JMAP method invocation (RFC 8620 §3.2).
On the wire this is a 3-element JSON array
[name, arguments, callId]; in Rust the elements are named fields.
From conversions to and from (String, Value, String) are
provided for code that already holds the tuple form.
Fields§
§name: StringMethod name, e.g. "Email/get", or "error" in a response.
arguments: ValueMethod arguments (request) or result (response) object.
call_id: StringClient-chosen method call id, echoed back in the response.
Implementations§
Source§impl Invocation
impl Invocation
Sourcepub fn new(
name: impl Into<String>,
arguments: Value,
call_id: impl Into<String>,
) -> Invocation
pub fn new( name: impl Into<String>, arguments: Value, call_id: impl Into<String>, ) -> Invocation
Construct an Invocation from its three wire elements.
Trait Implementations§
Source§impl Clone for Invocation
impl Clone for Invocation
Source§fn clone(&self) -> Invocation
fn clone(&self) -> Invocation
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 Invocation
impl Debug for Invocation
Source§impl<'de> Deserialize<'de> for Invocation
impl<'de> Deserialize<'de> for Invocation
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Invocation, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Invocation, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Invocation
impl PartialEq for Invocation
Source§impl Serialize for Invocation
impl Serialize for Invocation
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Invocation
Auto Trait Implementations§
impl Forget for Invocation
impl Freeze for Invocation
impl Move for Invocation
impl RefUnwindSafe for Invocation
impl Send for Invocation
impl Sync for Invocation
impl Unpin for Invocation
impl UnsafeUnpin for Invocation
impl UnwindSafe for Invocation
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