pub trait OpenRouter: Send + Sync {
// Required method
fn destination(&self, request: &Forwardable) -> Option<PartyRef>;
}Available on crate feature
hub only.Expand description
Decides where an Open Routing Request should go, from its content.
The specification leaves this entirely to the hub — “When a Hub has the intelligence to route
messages based on the content of the request” — so it is a trait. A typical implementation
looks at the country_code/party_id inside the body, or at the issuer of a token.
Required Methods§
Sourcefn destination(&self, request: &Forwardable) -> Option<PartyRef>
fn destination(&self, request: &Forwardable) -> Option<PartyRef>
The party this request should be routed to, or None to give up with 4001.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".