gix_status::index_as_worktree::traits

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