pub struct RequestObject {
pub using: Vec<String>,
pub method_calls: Vec<Invocation>,
pub created_ids: Option<HashMap<String, String>>,
}Expand description
JMAP request structure (RFC 8620 section 3.3)
Fields§
§using: Vec<String>Capabilities used by the client
method_calls: Vec<Invocation>Method calls to execute
created_ids: Option<HashMap<String, String>>Created object IDs mapping (optional)
Implementations§
Source§impl RequestObject
impl RequestObject
Sourcepub fn new(capabilities: Vec<String>) -> Self
pub fn new(capabilities: Vec<String>) -> Self
Create a new JMAP request with basic capabilities
Sourcepub fn with_method_call(
self,
method_name: String,
arguments: JsonValue,
call_id: String,
) -> Self
pub fn with_method_call( self, method_name: String, arguments: JsonValue, call_id: String, ) -> Self
Add a method call to the request
Sourcepub fn with_core_capability(capability: &str) -> Self
pub fn with_core_capability(capability: &str) -> Self
Helper to create a standard JMAP request with core capabilities
Trait Implementations§
Source§impl Clone for RequestObject
impl Clone for RequestObject
Source§fn clone(&self) -> RequestObject
fn clone(&self) -> RequestObject
Returns a duplicate of the value. Read more
1.0.0 · 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 RequestObject
impl Debug for RequestObject
Source§impl<'de> Deserialize<'de> for RequestObject
impl<'de> Deserialize<'de> for RequestObject
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
Auto Trait Implementations§
impl Freeze for RequestObject
impl RefUnwindSafe for RequestObject
impl Send for RequestObject
impl Sync for RequestObject
impl Unpin for RequestObject
impl UnwindSafe for RequestObject
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