pub struct VolumeSection { /* private fields */ }
Available on crate feature
v3
only.Expand description
A volume section containing a directory tree.
Implementations§
Source§impl VolumeSection
impl VolumeSection
pub fn name(&self) -> &str
pub fn lookup_file( &self, path: impl ToPathSegments, ) -> Result<(OwnedBuffer, [u8; 32]), LookupError>
pub fn root(&self) -> Result<Directory<'_>, VolumeHeaderError>
Trait Implementations§
Source§impl AbstractVolume for VolumeSection
impl AbstractVolume for VolumeSection
Source§fn metadata(&self, path: &PathSegments) -> Option<Metadata>
fn metadata(&self, path: &PathSegments) -> Option<Metadata>
Returns the metadata of the entry associated with
path
Source§fn read_dir(
&self,
path: &PathSegments,
) -> Option<Vec<(PathSegment, Option<[u8; 32]>, Metadata)>>
fn read_dir( &self, path: &PathSegments, ) -> Option<Vec<(PathSegment, Option<[u8; 32]>, Metadata)>>
Returns the entries of
path
Source§fn read_file(
&self,
path: &PathSegments,
) -> Option<(OwnedBuffer, Option<[u8; 32]>)>
fn read_file( &self, path: &PathSegments, ) -> Option<(OwnedBuffer, Option<[u8; 32]>)>
Returnes the contents of the file associated with
path
and optionally, its hashSource§impl Clone for VolumeSection
impl Clone for VolumeSection
Source§fn clone(&self) -> VolumeSection
fn clone(&self) -> VolumeSection
Returns a copy 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 VolumeSection
impl Debug for VolumeSection
Source§impl From<VolumeSection> for Section
impl From<VolumeSection> for Section
Source§fn from(value: VolumeSection) -> Self
fn from(value: VolumeSection) -> Self
Converts to this type from the input type.
Source§impl From<VolumeSection> for Volume
impl From<VolumeSection> for Volume
Source§fn from(value: VolumeSection) -> Self
fn from(value: VolumeSection) -> Self
Converts to this type from the input type.
Source§impl PartialEq for VolumeSection
impl PartialEq for VolumeSection
Source§impl TryFrom<Section> for VolumeSection
impl TryFrom<Section> for VolumeSection
impl StructuralPartialEq for VolumeSection
Auto Trait Implementations§
impl !Freeze for VolumeSection
impl RefUnwindSafe for VolumeSection
impl Send for VolumeSection
impl Sync for VolumeSection
impl Unpin for VolumeSection
impl UnwindSafe for VolumeSection
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