Trait AbstractVolume

Source
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§

Source

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)>>

Returns the entries of path

Source

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§

Source§

impl AbstractVolume for webc::v2::read::VolumeSection

Available on crate feature v2 only.
Source§

impl AbstractVolume for webc::v3::read::VolumeSection

Available on crate feature v3 only.