pub struct ServerSelect {
pub mpl_version: String,
pub protocol: Option<String>,
pub stypes: Vec<String>,
pub tools: Vec<ToolResponse>,
pub profile: Option<String>,
pub policies: Vec<String>,
pub features: Vec<String>,
pub downgrades: Vec<Downgrade>,
pub success: bool,
pub error: Option<String>,
pub server_id: Option<String>,
}Expand description
Server’s response selecting compatible capabilities
Fields§
§mpl_version: StringMPL protocol version
protocol: Option<String>Selected protocol
stypes: Vec<String>Supported STypes from client’s list
tools: Vec<ToolResponse>Available tools from client’s list
profile: Option<String>Selected QoM profile (may differ from requested)
policies: Vec<String>Accepted policies
features: Vec<String>Supported features
downgrades: Vec<Downgrade>Downgrade explanations
success: boolWhether negotiation succeeded
error: Option<String>Error message if negotiation failed
server_id: Option<String>Server identifier
Implementations§
Source§impl ServerSelect
impl ServerSelect
Sourcepub fn with_protocol(self, protocol: impl Into<String>) -> Self
pub fn with_protocol(self, protocol: impl Into<String>) -> Self
Set selected protocol
Sourcepub fn with_stypes(self, stypes: Vec<String>) -> Self
pub fn with_stypes(self, stypes: Vec<String>) -> Self
Set supported STypes
Sourcepub fn with_tools(self, tools: Vec<ToolResponse>) -> Self
pub fn with_tools(self, tools: Vec<ToolResponse>) -> Self
Set available tools
Sourcepub fn with_profile(self, profile: impl Into<String>) -> Self
pub fn with_profile(self, profile: impl Into<String>) -> Self
Set selected profile
Sourcepub fn with_downgrade(self, downgrade: Downgrade) -> Self
pub fn with_downgrade(self, downgrade: Downgrade) -> Self
Add a downgrade
Trait Implementations§
Source§impl Clone for ServerSelect
impl Clone for ServerSelect
Source§fn clone(&self) -> ServerSelect
fn clone(&self) -> ServerSelect
Returns a duplicate of the value. Read more
1.0.0 · 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 ServerSelect
impl Debug for ServerSelect
Source§impl<'de> Deserialize<'de> for ServerSelect
impl<'de> Deserialize<'de> for ServerSelect
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 Freeze for ServerSelect
impl RefUnwindSafe for ServerSelect
impl Send for ServerSelect
impl Sync for ServerSelect
impl Unpin for ServerSelect
impl UnwindSafe for ServerSelect
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointerSource§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