pub struct ConflictSide {
pub source_state: StateId,
pub blob_id: Option<ContentHash>,
pub range: ConflictRange,
pub hunk_hash: ContentHash,
}Expand description
Provenance and integrity information for one side of a conflict region.
Fields§
§source_state: StateId§blob_id: Option<ContentHash>None means the path was absent in this source state.
range: ConflictRange§hunk_hash: ContentHashBLAKE3 of the exact bytes selected by range from blob_id.
Implementations§
Source§impl ConflictSide
impl ConflictSide
pub fn new( source_state: StateId, blob_id: Option<ContentHash>, range: ConflictRange, blob_bytes: &[u8], ) -> Result<Self, ConflictError>
pub fn validate(&self) -> Result<(), ConflictError>
Sourcepub fn verify_blob(&self, blob_bytes: &[u8]) -> Result<(), ConflictError>
pub fn verify_blob(&self, blob_bytes: &[u8]) -> Result<(), ConflictError>
Verify both the whole-blob address and the selected hunk hash.
Trait Implementations§
Source§impl Clone for ConflictSide
impl Clone for ConflictSide
Source§fn clone(&self) -> ConflictSide
fn clone(&self) -> ConflictSide
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConflictSide
impl Debug for ConflictSide
Source§impl<'de> Deserialize<'de> for ConflictSide
impl<'de> Deserialize<'de> for ConflictSide
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
impl Eq for ConflictSide
Source§impl PartialEq for ConflictSide
impl PartialEq for ConflictSide
Source§impl Serialize for ConflictSide
impl Serialize for ConflictSide
impl StructuralPartialEq for ConflictSide
Auto Trait Implementations§
impl Freeze for ConflictSide
impl RefUnwindSafe for ConflictSide
impl Send for ConflictSide
impl Sync for ConflictSide
impl Unpin for ConflictSide
impl UnsafeUnpin for ConflictSide
impl UnwindSafe for ConflictSide
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