Struct libpijul::change::ChangeFile
source · 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 RefUnwindSafe for ChangeFile
impl Send for ChangeFile
impl !Sync for ChangeFile
impl Unpin 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