MCPcopy Create free account
hub / github.com/dexwritescode/rust-mcp / format_code

Method format_code

src/analyzer/client.rs:253–264  ·  view source on GitHub ↗
(&mut self, file_path: &str)

Source from the content-addressed store, hash-verified

251 }
252
253 pub async fn format_code(&mut self, file_path: &str) -> Result<String> {
254 if !self.initialized {
255 return Err(anyhow::anyhow!("Client not initialized"));
256 }
257
258 let params = create_formatting_params(file_path);
259 let response = self
260 .send_request_internal("textDocument/formatting", params)
261 .await?;
262
263 Ok(format!("Formatting response: {response}"))
264 }
265
266 pub async fn analyze_manifest(&mut self, manifest_path: &str) -> Result<String> {
267 // This would analyze Cargo.toml file

Callers 1

format_code_implFunction · 0.45

Calls 2

create_formatting_paramsFunction · 0.85
send_request_internalMethod · 0.80

Tested by

no test coverage detected