pub struct HarnessAdapter {
pub name: &'static str,
pub paths_fn: fn() -> Vec<PathBuf>,
pub upsert_fn: fn(&Path, &str, &Value) -> Result<bool>,
pub remove_fn: fn(&Path, &str) -> Result<bool>,
}Expand description
One harness this build can register the wire MCP server with.
Fields§
§name: &'static strOperator-facing label printed by wire setup.
paths_fn: fn() -> Vec<PathBuf>Returns every probable config path on the running platform. May be empty when the host isn’t shipped for the current OS.
upsert_fn: fn(&Path, &str, &Value) -> Result<bool>Atomic merge of (server_name, entry) into the host’s
config file at path. Returns Ok(true) on change,
Ok(false) on no-op (entry already exact).
remove_fn: fn(&Path, &str) -> Result<bool>Remove the (server_name) entry from the host’s config at
path. Returns Ok(true) on change, Ok(false) if the file
is absent or the entry wasn’t present (idempotent). MUST NOT
create a missing file.
Auto Trait Implementations§
impl Freeze for HarnessAdapter
impl RefUnwindSafe for HarnessAdapter
impl Send for HarnessAdapter
impl Sync for HarnessAdapter
impl Unpin for HarnessAdapter
impl UnsafeUnpin for HarnessAdapter
impl UnwindSafe for HarnessAdapter
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