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§
Source§impl LocalChange<Hunk<Option<Hash>, Local>, Author>
impl LocalChange<Hunk<Option<Hash>, Local>, Author>
pub fn write_all_deps_old<F: FnMut(Hash) -> Result<(), ChangeError>>( &self, f: F, ) -> Result<(), ChangeError>
pub fn write<W: WriteChangeLine, C: ChangeStore>( &self, changes: &C, hash: Option<Hash>, write_header: bool, w: W, ) -> Result<(), TextSerError<C::Error>>
Source§impl LocalChange<BaseHunk<Atom<Option<Hash>>, Local>, Author>
impl LocalChange<BaseHunk<Atom<Option<Hash>>, Local>, Author>
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, TextDeErrorDeps<T>>
pub fn read<R: BufRead>( r: R, updatables: &mut HashMap<usize, InodeUpdate>, ) -> Result<Self, TextDeError>
Source§impl LocalChange<Hunk<Option<Hash>, Local>, Author>
impl LocalChange<Hunk<Option<Hash>, Local>, Author>
pub const OFFSETS_SIZE: u64 = 56
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, MakeChangeError<T>>
pub fn write_all_deps<F: FnMut(Hash) -> Result<(), ChangeError>>( &self, f: F, ) -> Result<(), ChangeError>
Source§impl LocalChange<BaseHunk<Atom<Option<Hash>>, Local>, Author>
impl LocalChange<BaseHunk<Atom<Option<Hash>>, Local>, Author>
pub fn size_no_contents<R: Read + Seek>(r: &mut R) -> Result<u64, ChangeError>
Sourcepub fn serialize<W: Write, E: From<ChangeError>, F: FnOnce(&mut Self, &Hash) -> Result<(), E>>(
&mut self,
w: W,
f: F,
) -> Result<Hash, E>
pub fn serialize<W: Write, E: From<ChangeError>, F: FnOnce(&mut Self, &Hash) -> Result<(), E>>( &mut self, w: W, f: F, ) -> Result<Hash, E>
Serialise the change as a file named “dir, where “
Sourcepub fn check_from_buffer(buf: &[u8], hash: &Hash) -> Result<(), ChangeError>
pub fn check_from_buffer(buf: &[u8], hash: &Hash) -> Result<(), ChangeError>
Deserialise a change from the file given as input file.
Sourcepub fn deserialize(file: &str, hash: Option<&Hash>) -> Result<Self, ChangeError>
pub fn deserialize(file: &str, hash: Option<&Hash>) -> Result<Self, ChangeError>
Deserialise a change from the file given as input file.
Methods from Deref<Target = Hashed<Hunk<Option<Hash>, Local>, Author>>§
pub fn write_all_deps<F: FnMut(Hash) -> Result<(), ChangeError>>( &self, f: F, ) -> Result<(), ChangeError>
Trait Implementations§
Source§impl<Hunk: Clone, Author: Clone> Clone for LocalChange<Hunk, Author>
impl<Hunk: Clone, Author: Clone> Clone for LocalChange<Hunk, Author>
Source§fn clone(&self) -> LocalChange<Hunk, Author>
fn clone(&self) -> LocalChange<Hunk, Author>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<Hunk: PartialEq, Author: PartialEq> StructuralPartialEq for LocalChange<Hunk, Author>
Auto Trait Implementations§
impl<Hunk, Author> Freeze for LocalChange<Hunk, Author>
impl<Hunk, Author> RefUnwindSafe for LocalChange<Hunk, Author>where
Hunk: RefUnwindSafe,
Author: RefUnwindSafe,
impl<Hunk, Author> Send for LocalChange<Hunk, Author>
impl<Hunk, Author> Sync for LocalChange<Hunk, Author>
impl<Hunk, Author> Unpin for LocalChange<Hunk, Author>
impl<Hunk, Author> UnsafeUnpin for LocalChange<Hunk, Author>
impl<Hunk, Author> UnwindSafe for LocalChange<Hunk, Author>where
Hunk: UnwindSafe,
Author: UnwindSafe,
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