#[non_exhaustive]pub struct HandlerOutput {
pub primary: Value,
pub extra_invocations: Vec<Invocation>,
}Expand description
The successful result of one JmapHandler::call.
#[non_exhaustive] so fields can be added without breaking handler
crates; build it with HandlerOutput::new and
HandlerOutput::with_extra.
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.primary: ValueThe method’s response arguments. The dispatcher pairs this with the call’s method name and call id as the primary response invocation.
extra_invocations: Vec<Invocation>Zero or more invocations appended to methodResponses immediately
after the primary response, in order. Most handlers leave this
empty. RFC 8621 §7.5 EmailSubmission/set uses it for the implicit
Email/set response for onSuccessUpdateEmail.
Implementations§
Source§impl HandlerOutput
impl HandlerOutput
Sourcepub fn with_extra(self, extra_invocations: Vec<Invocation>) -> Self
pub fn with_extra(self, extra_invocations: Vec<Invocation>) -> Self
Set the invocations to append after the primary response.
Trait Implementations§
Source§impl Clone for HandlerOutput
impl Clone for HandlerOutput
Source§impl Debug for HandlerOutput
impl Debug for HandlerOutput
Source§impl PartialEq for HandlerOutput
impl PartialEq for HandlerOutput
impl StructuralPartialEq for HandlerOutput
Auto Trait Implementations§
impl Freeze for HandlerOutput
impl RefUnwindSafe for HandlerOutput
impl Send for HandlerOutput
impl Sync for HandlerOutput
impl Unpin for HandlerOutput
impl UnsafeUnpin for HandlerOutput
impl UnwindSafe for HandlerOutput
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