#[non_exhaustive]pub struct ResultReference {
pub result_of: String,
pub name: String,
pub path: String,
}Expand description
A reference to the result of a previous invocation in the same JMAP request batch. Used in method arguments with a “#” prefix on the JSON key (RFC 8620 §9).
Example JSON:
{"resultOf": "0", "name": "ChatContact/get", "path": "/list/0/id"}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.result_of: StringThe call-id of the prior method invocation being referenced.
name: StringThe method name of that prior invocation (e.g. “ChatContact/get”).
path: StringJSON Pointer (RFC 6901) into the result, e.g. “/list/0/id”.
Implementations§
Source§impl ResultReference
impl ResultReference
Sourcepub fn new(
result_of: impl Into<String>,
name: impl Into<String>,
path: impl Into<String>,
) -> Self
pub fn new( result_of: impl Into<String>, name: impl Into<String>, path: impl Into<String>, ) -> Self
Construct a ResultReference from its three required fields.
result_of: call-id of the prior method invocation
name: method name of that invocation (e.g. "Foo/get")
path: RFC 6901 JSON Pointer into the result (e.g. "/list/*/id")
Trait Implementations§
Source§impl Clone for ResultReference
impl Clone for ResultReference
Source§fn clone(&self) -> ResultReference
fn clone(&self) -> ResultReference
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 ResultReference
impl Debug for ResultReference
Source§impl<'de> Deserialize<'de> for ResultReference
impl<'de> Deserialize<'de> for ResultReference
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
impl Eq for ResultReference
Source§impl Hash for ResultReference
impl Hash for ResultReference
Source§impl PartialEq for ResultReference
impl PartialEq for ResultReference
Source§fn eq(&self, other: &ResultReference) -> bool
fn eq(&self, other: &ResultReference) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ResultReference
impl Serialize for ResultReference
impl StructuralPartialEq for ResultReference
Auto Trait Implementations§
impl Freeze for ResultReference
impl RefUnwindSafe for ResultReference
impl Send for ResultReference
impl Sync for ResultReference
impl Unpin for ResultReference
impl UnsafeUnpin for ResultReference
impl UnwindSafe for ResultReference
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