pub struct ChangeFile { /* private fields */ }Expand description
An open, seekable change file.
Implementations§
Source§impl ChangeFile
impl ChangeFile
Sourcepub fn open(hash: Hash, path: &str) -> Result<Self, ChangeError>
pub fn open(hash: Hash, path: &str) -> Result<Self, ChangeError>
Open a change file from a path.
pub fn has_contents(&self) -> bool
Sourcepub fn read_contents(
&mut self,
offset: u64,
buf: &mut [u8],
) -> Result<usize, ChangeError>
pub fn read_contents( &mut self, offset: u64, buf: &mut [u8], ) -> Result<usize, ChangeError>
Reads the contents at an offset into buf, and returns the
number of bytes read. The bounds of the change’s “contents”
section are not checked.
pub fn hashed(&self) -> &Hashed<Hunk<Option<Hash>, Local>, Author>
pub fn unhashed(&self) -> &Option<Value>
Auto Trait Implementations§
impl !Sync for ChangeFile
impl Freeze for ChangeFile
impl RefUnwindSafe for ChangeFile
impl Send for ChangeFile
impl Unpin for ChangeFile
impl UnsafeUnpin for ChangeFile
impl UnwindSafe for ChangeFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more