Struct libpijul::change::LocalChange [−][src]
pub struct LocalChange<Hunk, Author> { pub offsets: Offsets, pub hashed: Hashed<Hunk, Author>, pub unhashed: Option<Value>, pub contents: Vec<u8>, }
Fields
offsets: Offsets
hashed: Hashed<Hunk, Author>
unhashed: Option<Value>
unhashed TOML extra contents.
contents: Vec<u8>
The contents.
Implementations
pub fn write_all_deps<F: FnMut(Hash) -> Result<(), ChangeError>>(
&self,
f: F
) -> Result<(), ChangeError>
pub fn read_and_deps<R: BufRead, T: ChannelTxnT + DepsTxnT<DepsError = <T as GraphTxnT>::GraphError>>(
r: R,
updatables: &mut HashMap<usize, InodeUpdate>,
txn: &T,
channel: &ChannelRef<T>
) -> Result<Self, TextDeError>
pub fn read<R: BufRead>(
r: R,
updatables: &mut HashMap<usize, InodeUpdate>
) -> Result<Self, TextDeError>
pub fn make_change<T: ChannelTxnT + DepsTxnT<DepsError = <T as GraphTxnT>::GraphError>>(
txn: &T,
channel: &ChannelRef<T>,
changes: Vec<Hunk<Option<Hash>, Local>>,
contents: Vec<u8>,
header: ChangeHeader,
metadata: Vec<u8>
) -> Result<Self, TxnErr<T::DepsError>>
Serialise the change as a file named “dir
, where “
Deserialise a change from the file given as input file
.
Deserialise a change from the file given as input file
.
Trait Implementations
impl<Hunk: PartialEq, Author: PartialEq> PartialEq<LocalChange<Hunk, Author>> for LocalChange<Hunk, Author>
impl<Hunk: PartialEq, Author: PartialEq> PartialEq<LocalChange<Hunk, Author>> for LocalChange<Hunk, Author>
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<Hunk, Author> RefUnwindSafe for LocalChange<Hunk, Author> where
Author: RefUnwindSafe,
Hunk: RefUnwindSafe,
impl<Hunk, Author> Send for LocalChange<Hunk, Author> where
Author: Send,
Hunk: Send,
impl<Hunk, Author> Sync for LocalChange<Hunk, Author> where
Author: Sync,
Hunk: Sync,
impl<Hunk, Author> Unpin for LocalChange<Hunk, Author> where
Author: Unpin,
Hunk: Unpin,
impl<Hunk, Author> UnwindSafe for LocalChange<Hunk, Author> where
Author: UnwindSafe,
Hunk: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self