pub struct UpstreamConfig {
pub name: String,
pub url: Option<String>,
pub oauth: Option<UpstreamOauthConfig>,
}Expand description
Upstream MCP server identity + outbound OAuth configuration, as needed by
crate::upstream::manager::UpstreamOauthManager.
Fields§
§name: StringHuman-readable name for this upstream (used as the OAuth manager/cache key).
url: Option<String>URL of the upstream MCP server. Required when oauth is set.
oauth: Option<UpstreamOauthConfig>Outbound OAuth configuration. None means no OAuth manager is built
for this upstream.
Implementations§
Source§impl UpstreamConfig
impl UpstreamConfig
Sourcepub fn canonical_url(&self) -> Option<Result<String, ParseError>>
pub fn canonical_url(&self) -> Option<Result<String, ParseError>>
Canonicalized url per RFC 3986 §6.2.2 (scheme/host lowercase,
default port stripped, dot-segment removal, percent-encoding case
normalization). Trailing slashes are preserved — they are
semantically significant in HTTP paths.
Returns None when url is unset, Some(Err(_)) when it is set but
not a valid URL.
Trait Implementations§
Source§impl Clone for UpstreamConfig
impl Clone for UpstreamConfig
Source§fn clone(&self) -> UpstreamConfig
fn clone(&self) -> UpstreamConfig
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 UpstreamConfig
impl Debug for UpstreamConfig
Source§impl<'de> Deserialize<'de> for UpstreamConfig
impl<'de> Deserialize<'de> for UpstreamConfig
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
Source§impl PartialEq for UpstreamConfig
impl PartialEq for UpstreamConfig
Source§fn eq(&self, other: &UpstreamConfig) -> bool
fn eq(&self, other: &UpstreamConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UpstreamConfig
impl Serialize for UpstreamConfig
impl Eq for UpstreamConfig
impl StructuralPartialEq for UpstreamConfig
Auto Trait Implementations§
impl Freeze for UpstreamConfig
impl RefUnwindSafe for UpstreamConfig
impl Send for UpstreamConfig
impl Sync for UpstreamConfig
impl Unpin for UpstreamConfig
impl UnsafeUnpin for UpstreamConfig
impl UnwindSafe for UpstreamConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more