pub struct ToolPins {
pub version: String,
pub created_at: String,
pub updated_at: String,
pub tools: FxHashMap<String, PinnedTool>,
}Expand description
Represents pinned MCP tool configurations.
Fields§
§version: StringVersion of the pinning format.
created_at: StringWhen the pins were first created.
updated_at: StringWhen the pins were last updated.
tools: FxHashMap<String, PinnedTool>Pinned tools by name.
Implementations§
Source§impl ToolPins
impl ToolPins
Sourcepub fn from_mcp_config(path: &Path) -> Result<Self>
pub fn from_mcp_config(path: &Path) -> Result<Self>
Create new pins from an MCP configuration file.
Sourcepub fn from_mcp_content(content: &str, path: &Path) -> Result<Self>
pub fn from_mcp_content(content: &str, path: &Path) -> Result<Self>
Create new pins from MCP configuration content.
Sourcepub fn save_to_file(&self, path: &Path) -> Result<()>
pub fn save_to_file(&self, path: &Path) -> Result<()>
Save pins to a specific file.
Sourcepub fn load_from_file(path: &Path) -> Result<Self>
pub fn load_from_file(path: &Path) -> Result<Self>
Load pins from a specific file.
Sourcepub fn verify(&self, mcp_path: &Path) -> Result<PinVerifyResult>
pub fn verify(&self, mcp_path: &Path) -> Result<PinVerifyResult>
Verify current configuration against pins.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolPins
impl<'de> Deserialize<'de> for ToolPins
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 ToolPins
impl RefUnwindSafe for ToolPins
impl Send for ToolPins
impl Sync for ToolPins
impl Unpin for ToolPins
impl UnwindSafe for ToolPins
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more