Trait gix_status::index_as_worktree::traits::ReadData

source ·
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§

source

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.

source

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.

Implementors§