pub struct ReviewAnchor {
pub path: String,
pub side: ReviewSide,
pub line: u32,
pub content_hash: u64,
pub context: Vec<String>,
pub base_ref: String,
}Expand description
Durable, drift-robust location of a review thread, re-resolved to a
positional index against a fresh diff scan on every overlay open;
content_hash + context let the resolver re-anchor a moved line
or flag it Outdated.
Fields§
§path: String§side: ReviewSide§line: u32§content_hash: u64The anchored line’s hash, as a full u64.
It crosses as decimal digits rather than a JSON number, which is the convention protobuf’s JSON mapping gives its 64-bit fields: the web client reads a thread’s hash and re-sends it on every reply, and JS numbers are doubles - exact only to 2^53 - so a number form would come back rounded and silently anchor the thread elsewhere. The deserializer still accepts a number, which is what blobs written before this change hold.
context: Vec<String>§base_ref: StringTrait Implementations§
Source§impl Clone for ReviewAnchor
impl Clone for ReviewAnchor
Source§impl Debug for ReviewAnchor
impl Debug for ReviewAnchor
Source§impl<'de> Deserialize<'de> for ReviewAnchor
impl<'de> Deserialize<'de> for ReviewAnchor
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>,
impl Eq for ReviewAnchor
Source§impl PartialEq for ReviewAnchor
impl PartialEq for ReviewAnchor
Source§impl Serialize for ReviewAnchor
Hand-written for one field’s sake: content_hash goes out as digits,
and serde’s serialize_with would hand the helper a &u64 - a
signature the pedantic lints refuse, and this project carries no
suppression for it. The deserializer stays derived above.
impl Serialize for ReviewAnchor
Hand-written for one field’s sake: content_hash goes out as digits,
and serde’s serialize_with would hand the helper a &u64 - a
signature the pedantic lints refuse, and this project carries no
suppression for it. The deserializer stays derived above.
impl StructuralPartialEq for ReviewAnchor
Auto Trait Implementations§
impl Freeze for ReviewAnchor
impl RefUnwindSafe for ReviewAnchor
impl Send for ReviewAnchor
impl Sync for ReviewAnchor
impl Unpin for ReviewAnchor
impl UnsafeUnpin for ReviewAnchor
impl UnwindSafe for ReviewAnchor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.