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 for Key<H>
impl<H: PartialOrd> PartialOrd for Key<H>
Source§impl Representable for Key<PatchId>
impl Representable for Key<PatchId>
Source§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
.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.
Source§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.Source§impl ToHex for Key<PatchId>
impl ToHex for Key<PatchId>
impl<H: Copy> Copy for Key<H>
impl<H: Eq> Eq for Key<H>
impl<H> StructuralPartialEq for Key<H>
Auto Trait Implementations§
impl<H> Freeze for Key<H>where
H: Freeze,
impl<H> RefUnwindSafe for Key<H>where
H: RefUnwindSafe,
impl<H> Send for Key<H>where
H: Send,
impl<H> Sync for Key<H>where
H: Sync,
impl<H> Unpin for Key<H>where
H: Unpin,
impl<H> UnwindSafe for Key<H>where
H: 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