pub struct RequestResponder { /* private fields */ }Expand description
Helper used by request handlers to publish replies.
Implementations§
Source§impl RequestResponder
impl RequestResponder
Sourcepub async fn respond(
&self,
message_type: impl Into<String>,
payload: HashMap<String, Value>,
) -> ClientResult<i32>
pub async fn respond( &self, message_type: impl Into<String>, payload: HashMap<String, Value>, ) -> ClientResult<i32>
Sends a typed reply event to the request’s reply topic.
Sourcepub async fn respond_ok(
&self,
payload: HashMap<String, Value>,
) -> ClientResult<i32>
pub async fn respond_ok( &self, payload: HashMap<String, Value>, ) -> ClientResult<i32>
Sends a reply using the request’s original message type.
Trait Implementations§
Source§impl Clone for RequestResponder
impl Clone for RequestResponder
Source§fn clone(&self) -> RequestResponder
fn clone(&self) -> RequestResponder
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for RequestResponder
impl !UnwindSafe for RequestResponder
impl Freeze for RequestResponder
impl Send for RequestResponder
impl Sync for RequestResponder
impl Unpin for RequestResponder
impl UnsafeUnpin for RequestResponder
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