pub struct AbsolutePathResolver;Expand description
Path resolver that requires absolute paths.
This is the simplest resolver - it validates that paths are absolute and returns them as-is. No directory restrictions are applied.
§Example
use llm_coding_tools_core::path::{PathResolver, AbsolutePathResolver};
let resolver = AbsolutePathResolver;
#[cfg(windows)]
assert!(resolver.resolve("C:\\Users\\user\\file.txt").is_ok());
#[cfg(not(windows))]
assert!(resolver.resolve("/home/user/file.txt").is_ok());
assert!(resolver.resolve("relative/path.txt").is_err());Trait Implementations§
Source§impl Clone for AbsolutePathResolver
impl Clone for AbsolutePathResolver
Source§fn clone(&self) -> AbsolutePathResolver
fn clone(&self) -> AbsolutePathResolver
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 AbsolutePathResolver
impl Debug for AbsolutePathResolver
Source§impl Default for AbsolutePathResolver
impl Default for AbsolutePathResolver
Source§fn default() -> AbsolutePathResolver
fn default() -> AbsolutePathResolver
Returns the “default value” for a type. Read more
Source§impl PathResolver for AbsolutePathResolver
impl PathResolver for AbsolutePathResolver
impl Copy for AbsolutePathResolver
Auto Trait Implementations§
impl Freeze for AbsolutePathResolver
impl RefUnwindSafe for AbsolutePathResolver
impl Send for AbsolutePathResolver
impl Sync for AbsolutePathResolver
impl Unpin for AbsolutePathResolver
impl UnwindSafe for AbsolutePathResolver
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