pub struct LocalFileResolver { /* private fields */ }Expand description
Resolves scheme-less relative paths under a local base directory.
Fragments are ignored. Schemes, authorities, queries, semicolon path
parameters, backslashes, absolute paths, .. traversal, and symlink escapes
are rejected as outside the base.
Implementations§
Trait Implementations§
Source§impl Resolver for LocalFileResolver
impl Resolver for LocalFileResolver
Source§fn fetch<'life0, 'life1, 'async_trait>(
&'life0 self,
uri: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Unfetchable>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch<'life0, 'life1, 'async_trait>(
&'life0 self,
uri: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Unfetchable>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns bytes for
uri, or an Unfetchable error when the resource
cannot be fetched.Source§fn screens_local_paths(&self) -> bool
fn screens_local_paths(&self) -> bool
Returns true when
check_content should pre-screen local path references. Read moreAuto Trait Implementations§
impl Freeze for LocalFileResolver
impl RefUnwindSafe for LocalFileResolver
impl Send for LocalFileResolver
impl Sync for LocalFileResolver
impl Unpin for LocalFileResolver
impl UnsafeUnpin for LocalFileResolver
impl UnwindSafe for LocalFileResolver
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