pub trait ReadData<'a> {
// Required methods
fn read_blob(self) -> Result<&'a [u8], Error>;
fn stream_worktree_file(self) -> Result<Stream<'a>, Error>;
}
Expand description
Lazy borrowed access to worktree or blob data, with streaming support for worktree files.
Required Methods§
Sourcefn read_blob(self) -> Result<&'a [u8], Error>
fn read_blob(self) -> Result<&'a [u8], Error>
Returns the contents of this blob.
This potentially performs IO and other expensive operations and should only be called when necessary.
Sourcefn stream_worktree_file(self) -> Result<Stream<'a>, Error>
fn stream_worktree_file(self) -> Result<Stream<'a>, Error>
Stream a worktree file in such a manner that its content matches what would be put into git.