[][src]Type Definition libpijul::change::Change

type Change = LocalChange<Local>;

Implementations

impl Change[src]

pub fn knows(&self, hash: &Hash) -> bool[src]

pub fn has_edge(
    &self,
    hash: Hash,
    from: Position<Option<Hash>>,
    to: Position<Option<Hash>>,
    flags: EdgeFlags
) -> bool
[src]

impl Change[src]

pub fn inverse(
    &self,
    hash: &Hash,
    header: ChangeHeader,
    metadata: Vec<u8>
) -> Self
[src]

impl Change[src]

pub fn size_no_contents<R: Read + Seek>(r: &mut R) -> Result<u64, Error>[src]

pub fn serialize<W: Write>(&self, w: W) -> Result<Hash, Error>[src]

Serialise the change as a file named ".change" in directory dir, where "" is the actual hash of the change.

pub fn check_from_buffer(buf: &[u8], hash: &Hash) -> Result<(), Error>[src]

Deserialise a change from the file given as input file.

pub fn deserialize(file: &str, hash: Option<&Hash>) -> Result<Self, Error>[src]

Deserialise a change from the file given as input file.

pub fn hash(&self) -> Result<Hash, Error>[src]

Compute the hash of this change. If the zstd feature is enabled, it is probably more efficient to serialise the change (using the serialize method) at the same time, which also returns the hash.

impl Change[src]

pub fn read_and_deps<R: BufRead, T: TxnT>(
    r: R,
    updatables: &mut HashMap<usize, InodeUpdate>,
    txn: &T,
    channel: &ChannelRef<T>
) -> Result<Self, Error>
[src]

pub fn read<R: BufRead>(
    r: R,
    updatables: &mut HashMap<usize, InodeUpdate>
) -> Result<Self, Error>
[src]