Skip to main content

BundleSource

Trait BundleSource 

Source
pub trait BundleSource {
    // Required methods
    fn open(&self, path: &str) -> Result<Box<dyn Read + Send>, String>;
    fn list(&self) -> Result<Vec<String>, String>;
}
Expand description

Trait for reading files from a bundle

Required Methods§

Source

fn open(&self, path: &str) -> Result<Box<dyn Read + Send>, String>

Open the given path for streaming read. Must validate existence.

Source

fn list(&self) -> Result<Vec<String>, String>

Optionally list available files (used by generic decoders; can be best-effort).

Implementors§