pub struct SecureClient { /* private fields */ }
Implementations§
Source§impl SecureClient
impl SecureClient
Sourcepub async fn add_secure_value(&self, key: impl Into<String>, value: SecureValue)
pub async fn add_secure_value(&self, key: impl Into<String>, value: SecureValue)
Add a secure value to the client’s hash map.
Sourcepub async fn get_secure_value(&self, key: &str) -> Result<String, McpError>
pub async fn get_secure_value(&self, key: &str) -> Result<String, McpError>
Retrieve a secure value from the client.
If the stored value is a Static
variant, the stored string is returned.
If the stored value is an Env
variant, the stored string is used as the key
in std::env::var
to retrieve the actual value.
Trait Implementations§
Source§impl Client for SecureClient
impl Client for SecureClient
fn connect<'life0, 'async_trait, T>( &'life0 mut self, transport: T, ) -> Pin<Box<dyn Future<Output = Result<ProtocolHandle, McpError>> + Send + 'async_trait>>
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
client_info: ClientInfo,
) -> Pin<Box<dyn Future<Output = Result<InitializeResult, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_resources<'life0, 'async_trait>(
&'life0 self,
cursor: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<ListResourcesResponse, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_resource<'life0, 'async_trait>(
&'life0 self,
uri: String,
) -> Pin<Box<dyn Future<Output = Result<ReadResourceResponse, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_to_resource<'life0, 'async_trait>(
&'life0 self,
uri: String,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_prompts<'life0, 'async_trait>(
&'life0 self,
cursor: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<ListPromptsResponse, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_prompt<'life0, 'async_trait>(
&'life0 self,
name: String,
arguments: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<PromptResult, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_tools<'life0, 'async_trait>(
&'life0 self,
cursor: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<ListToolsResponse, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn call_tool<'life0, 'async_trait>(
&'life0 self,
name: String,
arguments: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult, McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_log_level<'life0, 'async_trait>(
&'life0 self,
level: String,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_server_capabilities<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<ServerCapabilities>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn has_capability<'life0, 'life1, 'async_trait>(
&'life0 self,
capability: &'life1 str,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_client_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<ClientInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn has_client_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn assert_initialized<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn assert_capability<'life0, 'life1, 'async_trait>(
&'life0 self,
capability: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cleanup_resources<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn wait_for_shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), McpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for SecureClient
impl !RefUnwindSafe for SecureClient
impl Send for SecureClient
impl Sync for SecureClient
impl Unpin for SecureClient
impl !UnwindSafe for SecureClient
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