pub struct SquashFs<S: BlockSource> { /* private fields */ }Expand description
A mounted SquashFS volume.
Trait Implementations§
Source§impl<S: BlockSource> FoldFrontend<S> for SquashFs<S>
impl<S: BlockSource> FoldFrontend<S> for SquashFs<S>
Source§const TAG: &'static str = "squashfs"
const TAG: &'static str = "squashfs"
Stable tag surfaced through trust events (“iso9660”, “udf”, “squashfs”, …).
Source§fn probe(src: &mut S) -> Result<bool>
fn probe(src: &mut S) -> Result<bool>
Cheap, bounded superblock/magic sniff — must not over-read. Returns
true if src looks like this format.Source§fn open(src: S, _cx: &mut SubstrateCtx<'_>) -> Result<Self>
fn open(src: S, _cx: &mut SubstrateCtx<'_>) -> Result<Self>
Mount the volume over
src, given the shared substrate.Source§fn lookup(
&mut self,
dir: NodeId,
name: &str,
cx: &mut SubstrateCtx<'_>,
) -> Result<Option<NodeId>>
fn lookup( &mut self, dir: NodeId, name: &str, cx: &mut SubstrateCtx<'_>, ) -> Result<Option<NodeId>>
Resolve one path component within
dir.Source§fn read_dir(
&mut self,
dir: NodeId,
_cx: &mut SubstrateCtx<'_>,
) -> Result<Vec<DirEntry>>
fn read_dir( &mut self, dir: NodeId, _cx: &mut SubstrateCtx<'_>, ) -> Result<Vec<DirEntry>>
List the entries of a directory (advisory: re-resolve by name before any
security decision — same contract as LamBoot’s
read_dir).Source§fn metadata(
&mut self,
node: NodeId,
_cx: &mut SubstrateCtx<'_>,
) -> Result<Metadata>
fn metadata( &mut self, node: NodeId, _cx: &mut SubstrateCtx<'_>, ) -> Result<Metadata>
Metadata for a node.
Source§fn read_at(
&mut self,
node: NodeId,
off: u64,
buf: &mut [u8],
_cx: &mut SubstrateCtx<'_>,
) -> Result<usize>
fn read_at( &mut self, node: NodeId, off: u64, buf: &mut [u8], _cx: &mut SubstrateCtx<'_>, ) -> Result<usize>
Read up to
buf.len() bytes of a regular file starting at off. Returns
the number of bytes read (0 at EOF).Source§fn read_link(
&mut self,
node: NodeId,
_cx: &mut SubstrateCtx<'_>,
) -> Result<Option<Vec<u8>>>
fn read_link( &mut self, node: NodeId, _cx: &mut SubstrateCtx<'_>, ) -> Result<Option<Vec<u8>>>
The target of a symbolic link (raw bytes), or
None if node is not a
symlink. Default: the format has no symlinks. Frontends that carry POSIX
semantics (ISO9660 Rock Ridge, squashfs, erofs) override this; the boot
path uses it to resolve e.g. /boot/vmlinuz → the real kernel.Auto Trait Implementations§
impl<S> Freeze for SquashFs<S>where
S: Freeze,
impl<S> RefUnwindSafe for SquashFs<S>where
S: RefUnwindSafe,
impl<S> Send for SquashFs<S>where
S: Send,
impl<S> Sync for SquashFs<S>where
S: Sync,
impl<S> Unpin for SquashFs<S>where
S: Unpin,
impl<S> UnsafeUnpin for SquashFs<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for SquashFs<S>where
S: UnwindSafe,
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