pub struct RelativePathResolver(/* private fields */);Expand description
The default import resolver, which resolves everything relative to one initial path
Implementations§
Source§impl RelativePathResolver
impl RelativePathResolver
Sourcepub fn siblings_with(file: impl AsRef<Path>) -> AstResult<Self>
pub fn siblings_with(file: impl AsRef<Path>) -> AstResult<Self>
A convenience function for creating based on a specific path, such as the main.ccs
Note that the source should be an absolute path, but this will then allow for resolving relative to the parent directory of the given file.
If the source isn’t absolute, it will go relative to the current working directory. However,
subsequent resolvers created through ImportResolver::new_context will be absolute.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RelativePathResolver
impl RefUnwindSafe for RelativePathResolver
impl Send for RelativePathResolver
impl Sync for RelativePathResolver
impl Unpin for RelativePathResolver
impl UnwindSafe for RelativePathResolver
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more