pub enum RoutingStrategy {
Remote,
Local,
LocalFirst,
RemoteFirst,
}Expand description
Routing strategy — how a tool invocation is dispatched when both the local executor and a connected upstream MCP server can handle the same tool.
Cloud has priority by design: the default strategy is Remote, so behavior is unchanged
for existing deployments unless the user explicitly opts in to local routing.
Variants§
Remote
Route every matched call to the upstream server. Local executor stays idle for matched tools (still used for local-only tools that have no upstream counterpart).
Local
Route matched calls to the local executor. If a tool has no local implementation, fall through to upstream.
LocalFirst
Try the local executor first; on error, fall back to upstream (requires
fallback_on_error).
RemoteFirst
Try upstream first; on error, fall back to the local executor (requires
fallback_on_error).
Implementations§
Trait Implementations§
Source§impl Clone for RoutingStrategy
impl Clone for RoutingStrategy
Source§fn clone(&self) -> RoutingStrategy
fn clone(&self) -> RoutingStrategy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RoutingStrategy
impl Debug for RoutingStrategy
Source§impl Default for RoutingStrategy
impl Default for RoutingStrategy
Source§fn default() -> RoutingStrategy
fn default() -> RoutingStrategy
Source§impl<'de> Deserialize<'de> for RoutingStrategy
impl<'de> Deserialize<'de> for RoutingStrategy
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>,
Source§impl PartialEq for RoutingStrategy
impl PartialEq for RoutingStrategy
Source§fn eq(&self, other: &RoutingStrategy) -> bool
fn eq(&self, other: &RoutingStrategy) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RoutingStrategy
impl Serialize for RoutingStrategy
impl Copy for RoutingStrategy
impl Eq for RoutingStrategy
impl StructuralPartialEq for RoutingStrategy
Auto Trait Implementations§
impl Freeze for RoutingStrategy
impl RefUnwindSafe for RoutingStrategy
impl Send for RoutingStrategy
impl Sync for RoutingStrategy
impl Unpin for RoutingStrategy
impl UnsafeUnpin for RoutingStrategy
impl UnwindSafe for RoutingStrategy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.