pub trait PathResolver: Send + Sync {
// Required method
fn resolve(&self, path: &str) -> ToolResult<PathBuf>;
}Expand description
Strategy for resolving and validating file paths.
Implementations control whether paths must be absolute, relative to allowed directories, or follow other constraints.
Required Methods§
Sourcefn resolve(&self, path: &str) -> ToolResult<PathBuf>
fn resolve(&self, path: &str) -> ToolResult<PathBuf>
Resolves and validates a path string.
Returns an absolute path (may or may not be canonical) if valid, or an error describing the issue.