pub trait ByteSource {
// Required methods
fn objects(&self) -> Vec<ObjectInfo>;
fn read(&self, span: &DataSpan, output: &mut dyn Write) -> Result<(), Error>;
// Provided method
fn map(&self, _span: &DataSpan) -> Result<Option<MappedBytes>, Error> { ... }
}Expand description
Object IDs belong to one source; they are neither paths nor content hashes. A copy/import operation must rebind them to its destination’s identities.
Required Methods§
Sourcefn objects(&self) -> Vec<ObjectInfo>
fn objects(&self) -> Vec<ObjectInfo>
List the objects addressable through this source.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".