Skip to main content

PathResolver

Trait PathResolver 

Source
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§

Source

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§