Enum libpijul_compat::patch::Patch
[−]
[src]
pub enum Patch {
Unsigned(UnsignedPatch),
Signed {
patch: UnsignedPatch,
signature: Signature,
},
}The definition of a patch.
Variants
Unsigned(UnsignedPatch)SignedFields of Signed
patch: UnsignedPatch | |
signature: Signature |
Methods
impl Patch[src]
fn changes(&self) -> &[Change][src]
The contents of this patch.
fn changes_mut(&mut self) -> &mut Vec<Change>[src]
fn dependencies(&self) -> &[Hash][src]
The dependencies of this patch.
fn dependencies_mut(&mut self) -> &mut Vec<Hash>[src]
fn header(&self) -> &PatchHeader[src]
The header of this patch.
fn header_mut(&mut self) -> &mut PatchHeader[src]
fn read_dependencies<R: Read>(r: R) -> Result<Vec<Hash>>[src]
Reads everything in this patch, but the actual contents.
impl Patch[src]
fn size_upper_bound(&self) -> usize[src]
An approximate upper bound of the number of extra bytes in the database this patch might require. This depends a lot on the patch and the database, so it might be wrong.
fn from_reader_compressed<R: BufRead>(
r: &mut R
) -> Result<(Hash, Vec<u8>, Patch)>[src]
r: &mut R
) -> Result<(Hash, Vec<u8>, Patch)>
Read one patch from a gzip-compressed BufRead. If several
patches are available in the same BufRead, this method can
be called again.
fn public_key(&self) -> Option<PublicKey>[src]
Public key of this patch's signature.
fn save<P: AsRef<Path>>(&self, dir: P, key: Option<&KeyPair>) -> Result<Hash>[src]
Save the patch, computing the hash.
Methods from Deref<Target = PatchHeader>
Trait Implementations
impl Debug for Patch[src]
impl Clone for Patch[src]
fn clone(&self) -> Patch[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Deref for Patch[src]
type Target = PatchHeader
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target[src]
Dereferences the value.