pub struct FilesystemHost { /* private fields */ }Expand description
A LinkHost backed by a directory on disk.
Host paths are relative to root; links can’t climb above it. Archives
are opened read-only on demand, and cached by modification time, to look
up entries. Nothing is extracted or written (Section 9.6).
Implementations§
Source§impl FilesystemHost
impl FilesystemHost
Sourcepub fn with_options(root: impl Into<PathBuf>, options: HostOptions) -> Self
pub fn with_options(root: impl Into<PathBuf>, options: HostOptions) -> Self
A host rooted at root.
Trait Implementations§
Source§impl Debug for FilesystemHost
impl Debug for FilesystemHost
Source§impl LinkHost for FilesystemHost
impl LinkHost for FilesystemHost
Source§fn find_entry(&self, archive: &str, entry: &str) -> Option<String>
fn find_entry(&self, archive: &str, entry: &str) -> Option<String>
The stored entry path in
archive matching entry (NFC,
case-sensitive), or None.Source§fn entry_point(&self, archive: &str) -> Option<String>
fn entry_point(&self, archive: &str) -> Option<String>
The entry point of
archive (Section 5.5), or None.Source§fn outside_links(&self) -> bool
fn outside_links(&self) -> bool
Whether links may leave an archive (Section 9.4).
Source§fn links_into_archives(&self) -> bool
fn links_into_archives(&self) -> bool
Whether links may point into archives (Section 9.5).
Source§fn trust_root(&self) -> Option<&str>
fn trust_root(&self) -> Option<&str>
The trust boundary (Section 9.6): targets outside it are denied.
Some("") trusts the whole host; None trusts no location at all.Source§fn is_allowed(&self, path: &str) -> bool
fn is_allowed(&self, path: &str) -> bool
Host paths outside the boundary that the user explicitly allowed.
Source§fn load_outside_resources(&self) -> bool
fn load_outside_resources(&self) -> bool
Whether embeds may load resources from outside an archive (inside the
trust boundary only).
Source§fn host_location(&self) -> bool
fn host_location(&self) -> bool
Whether the source archive has a location on this host (Section 9.4).
Auto Trait Implementations§
impl !Freeze for FilesystemHost
impl RefUnwindSafe for FilesystemHost
impl Send for FilesystemHost
impl Sync for FilesystemHost
impl Unpin for FilesystemHost
impl UnsafeUnpin for FilesystemHost
impl UnwindSafe for FilesystemHost
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