Struct libpijul_compat::Key
source · pub struct Key<H> {
pub patch: H,
pub line: LineId,
}
Expand description
A node in the repository graph, made of a patch internal identifier, and a line identifier in that patch.
Fields§
§patch: H
The patch that introduced this node.
line: LineId
The line identifier of the node in that patch. Here, “line” does not imply anything on the contents of the chunk.
Implementations§
Trait Implementations§
source§impl<'de, H> Deserialize<'de> for Key<H>where
H: Deserialize<'de>,
impl<'de, H> Deserialize<'de> for Key<H>where
H: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<H: Ord> Ord for Key<H>
impl<H: Ord> Ord for Key<H>
source§impl<H: PartialOrd> PartialOrd<Key<H>> for Key<H>
impl<H: PartialOrd> PartialOrd<Key<H>> for Key<H>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Representable for Key<PatchId>
impl Representable for Key<PatchId>
source§fn onpage_size(&self) -> u16
fn onpage_size(&self) -> u16
How much space this value occupies on the page (not counting alignment padding).
source§unsafe fn write_value(&self, p: *mut u8)
unsafe fn write_value(&self, p: *mut u8)
Write this value to a u8 pointer, guaranteed to be a multiple of
self.alignment()
.source§unsafe fn read_value(p: *const u8) -> Self
unsafe fn read_value(p: *const u8) -> Self
Read value from an onpage pointer, guaranteed to be a multiple of
self.alignment()
.source§unsafe fn cmp_value<T>(&self, _: &T, x: Self) -> Ordering
unsafe fn cmp_value<T>(&self, _: &T, x: Self) -> Ordering
Compare a value with an onpage value. The current transaction
is sometimes helpful, for instance when the page only stores a
pointer to another page. Read more
§type PageOffsets = Empty<u64>
type PageOffsets = Empty<u64>
An iterator over the offsets to pages contained in this
value. Only values from this crate can generate non-empty
iterators, but combined values (like tuples) must chain the
iterators returned by method
page_offsets
. Read moresource§fn page_offsets(&self) -> Self::PageOffsets
fn page_offsets(&self) -> Self::PageOffsets
If this value is an offset to another page at offset
offset
,
return Some(offset)
. Return None
else. Read more