pub struct RequestForwardConfig {
pub to: Box<Endpoint>,
pub forward_to: Box<Endpoint>,
}Expand description
Sends each message to a request-capable endpoint and forwards its response elsewhere.
Turns a request/reply exchange (HTTP, or a request_reply NATS/Mongo/Memory endpoint) into
a one-way flow whose response lands on forward_to — e.g. IBM MQ → HTTP → IBM MQ. On
request error/timeout the original message is forwarded instead (unchanged). Successful
responses carry the transport-native status (e.g. http_status_code), so a switch on
forward_to can route them by status; a failed request forwards the original message with
no status key, so catch failures on the switch’s default branch.
Fields§
§to: Box<Endpoint>The request-capable endpoint to send each message to (e.g. an http client).
forward_to: Box<Endpoint>Where the response (or, on error, the original message) is forwarded.
Trait Implementations§
Source§impl Clone for RequestForwardConfig
impl Clone for RequestForwardConfig
Source§fn clone(&self) -> RequestForwardConfig
fn clone(&self) -> RequestForwardConfig
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 RequestForwardConfig
impl Debug for RequestForwardConfig
Source§impl<'de> Deserialize<'de> for RequestForwardConfig
impl<'de> Deserialize<'de> for RequestForwardConfig
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 !RefUnwindSafe for RequestForwardConfig
impl !UnwindSafe for RequestForwardConfig
impl Freeze for RequestForwardConfig
impl Send for RequestForwardConfig
impl Sync for RequestForwardConfig
impl Unpin for RequestForwardConfig
impl UnsafeUnpin for RequestForwardConfig
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