pub struct VacuumTool;Expand description
Reclaim unused space and defragment the database file by running SQLite’s VACUUM command. This rebuilds the entire database into a compact, contiguous file. The operation may take a while on large databases.
Trait Implementations§
Source§impl Clone for VacuumTool
impl Clone for VacuumTool
Source§fn clone(&self) -> VacuumTool
fn clone(&self) -> VacuumTool
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VacuumTool
impl Debug for VacuumTool
Source§impl Default for VacuumTool
impl Default for VacuumTool
Source§fn default() -> VacuumTool
fn default() -> VacuumTool
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VacuumTool
impl<'de> Deserialize<'de> for VacuumTool
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
Source§impl Hash for VacuumTool
impl Hash for VacuumTool
Source§impl JsonSchema for VacuumTool
impl JsonSchema for VacuumTool
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for VacuumTool
impl Ord for VacuumTool
Source§fn cmp(&self, other: &VacuumTool) -> Ordering
fn cmp(&self, other: &VacuumTool) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for VacuumTool
impl PartialEq for VacuumTool
Source§impl PartialOrd for VacuumTool
impl PartialOrd for VacuumTool
Source§impl Serialize for VacuumTool
impl Serialize for VacuumTool
Source§impl SqliteServerTool for VacuumTool
impl SqliteServerTool for VacuumTool
Source§type Context = McpServerSqlite
type Context = McpServerSqlite
The server type passed to the handler on each invocation, typically
McpServerSqlite.Source§type Error = ToolError<VacuumError>
type Error = ToolError<VacuumError>
The error type returned by the handler. Must implement
IntoContents so
rmcp can render it as error content.Source§type Input = VacuumInput
type Input = VacuumInput
The deserialized input parameters received from the MCP client.
Source§type Output = VacuumOutput
type Output = VacuumOutput
The structured output returned to the MCP client on success.
Source§fn handle(
ctx: &Self::Context,
_input: Self::Input,
) -> Result<Self::Output, Self::Error>
fn handle( ctx: &Self::Context, _input: Self::Input, ) -> Result<Self::Output, Self::Error>
Executes the tool’s logic against the given context and input. Called
synchronously on the tokio blocking thread pool.
Source§fn tool() -> Tool
fn tool() -> Tool
Builds the rmcp
Tool definition for this tool, including its name,
description (extracted from the JsonSchema derive), input schema, and
output schema.Source§fn handler_func() -> fn(&<Self as SqliteServerTool>::Context, Parameters<<Self as SqliteServerTool>::Input>) -> Result<Json<<Self as SqliteServerTool>::Output>, <Self as SqliteServerTool>::Error>
fn handler_func() -> fn(&<Self as SqliteServerTool>::Context, Parameters<<Self as SqliteServerTool>::Input>) -> Result<Json<<Self as SqliteServerTool>::Output>, <Self as SqliteServerTool>::Error>
Returns a closure that deserializes the input parameters, calls
handle, and wraps the output in Json for structured MCP responses.
Every invocation is automatically traced with the tool name, duration,
and outcome. The closure is compatible with ToolRouter::with_route.impl Copy for VacuumTool
impl Eq for VacuumTool
impl StructuralPartialEq for VacuumTool
Auto Trait Implementations§
impl Freeze for VacuumTool
impl RefUnwindSafe for VacuumTool
impl Send for VacuumTool
impl Sync for VacuumTool
impl Unpin for VacuumTool
impl UnsafeUnpin for VacuumTool
impl UnwindSafe for VacuumTool
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