pub enum RefTarget {
Normal {
target: Cid,
},
Conflicted {
adds: Vec<Cid>,
removes: Vec<Cid>,
},
}Expand description
A named reference in a View.
Per SPEC §4.6 the on-wire form has a kind discriminator:
{ "kind": "normal", "target": Link<Commit> }
{ "kind": "conflicted", "adds": [Link], "removes": [Link] }Canonical form for Conflicted: adds and removes MUST each be
strictly ascending by CID byte representation, with no duplicates
and not both empty. See SPEC §4.6 amendments.
Variants§
Normal
A single Commit target.
Conflicted
Unresolved concurrent-update state. Canonical form sorts
adds and removes ascending.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RefTarget
impl<'de> Deserialize<'de> for RefTarget
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 RefTarget
impl StructuralPartialEq for RefTarget
Auto Trait Implementations§
impl Freeze for RefTarget
impl RefUnwindSafe for RefTarget
impl Send for RefTarget
impl Sync for RefTarget
impl Unpin for RefTarget
impl UnsafeUnpin for RefTarget
impl UnwindSafe for RefTarget
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