pub struct NetNegative(/* private fields */);Expand description
A LineChange that removes more than it adds, and the only thing that can be
one.
The mark and its evidence are one value, so a row cannot carry a count that says
the opposite of the field holding it — and the rule that decides “net-negative”
lives here rather than at the site that measures a branch and at every consumer
that reads one back. It serializes and reads as the LineChange it holds, so
the two counts are what --json carries either way; a document naming a count
that is not net-negative is refused where it is read.
Implementations§
Trait Implementations§
Source§impl Clone for NetNegative
impl Clone for NetNegative
impl Copy for NetNegative
Source§impl Debug for NetNegative
impl Debug for NetNegative
Source§impl<'de> Deserialize<'de> for NetNegative
impl<'de> Deserialize<'de> for NetNegative
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 NetNegative
Source§impl From<NetNegative> for LineChange
impl From<NetNegative> for LineChange
Source§fn from(value: NetNegative) -> Self
fn from(value: NetNegative) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NetNegative
impl PartialEq for NetNegative
Source§impl Serialize for NetNegative
impl Serialize for NetNegative
impl StructuralPartialEq for NetNegative
Source§impl TryFrom<LineChange> for NetNegative
impl TryFrom<LineChange> for NetNegative
Auto Trait Implementations§
impl Freeze for NetNegative
impl RefUnwindSafe for NetNegative
impl Send for NetNegative
impl Sync for NetNegative
impl Unpin for NetNegative
impl UnsafeUnpin for NetNegative
impl UnwindSafe for NetNegative
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.