pub trait AbstractVolume: Debug {
// Required methods
fn metadata(&self, path: &PathSegments) -> Option<Metadata>;
fn read_dir(
&self,
path: &PathSegments,
) -> Option<Vec<(PathSegment, Option<[u8; 32]>, Metadata)>>;
fn read_file(
&self,
path: &PathSegments,
) -> Option<(OwnedBuffer, Option<[u8; 32]>)>;
}
Expand description
Abstraction over different volume implementations
Required Methods§
Sourcefn metadata(&self, path: &PathSegments) -> Option<Metadata>
fn metadata(&self, path: &PathSegments) -> Option<Metadata>
Returns the metadata of the entry associated with path
Sourcefn 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
Sourcefn 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 hash
Implementors§
impl AbstractVolume for webc::v2::read::VolumeSection
Available on crate feature
v2
only.impl AbstractVolume for webc::v3::read::VolumeSection
Available on crate feature
v3
only.