pub struct PromptManager {
pub prompts: Arc<RwLock<HashMap<String, Prompt>>>,
pub capabilities: PromptCapabilities,
pub notification_sender: Option<NotificationSender>,
}
Fields§
§prompts: Arc<RwLock<HashMap<String, Prompt>>>
§capabilities: PromptCapabilities
§notification_sender: Option<NotificationSender>
Implementations§
Source§impl PromptManager
impl PromptManager
pub fn new(capabilities: PromptCapabilities) -> Self
pub fn set_notification_sender(&mut self, sender: NotificationSender)
pub async fn register_prompt(&self, prompt: Prompt)
pub async fn list_prompts( &self, _cursor: Option<String>, ) -> Result<ListPromptsResponse, McpError>
pub async fn get_prompt( &self, name: &str, arguments: Option<Value>, ) -> Result<PromptResult, McpError>
Auto Trait Implementations§
impl Freeze for PromptManager
impl !RefUnwindSafe for PromptManager
impl Send for PromptManager
impl Sync for PromptManager
impl Unpin for PromptManager
impl !UnwindSafe for PromptManager
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