pub struct ReviewDiffEntry {
pub field: String,
pub label: LocalizedText,
pub before: FieldValue,
pub after: FieldValue,
}Expand description
One line of a review card: a field before and after the proposed change.
Fields§
§field: StringStable field path.
label: LocalizedTextLabel copy.
before: FieldValueCurrent value.
after: FieldValueProposed value.
Implementations§
Source§impl ReviewDiffEntry
impl ReviewDiffEntry
Sourcepub fn new(field: impl Into<String>, label: impl Into<LocalizedText>) -> Self
pub fn new(field: impl Into<String>, label: impl Into<LocalizedText>) -> Self
Builds an entry with both sides absent.
Sourcepub fn with_before(self, before: FieldValue) -> Self
pub fn with_before(self, before: FieldValue) -> Self
Sets the current value.
Sourcepub fn with_after(self, after: FieldValue) -> Self
pub fn with_after(self, after: FieldValue) -> Self
Sets the proposed value.
Trait Implementations§
Source§impl Clone for ReviewDiffEntry
impl Clone for ReviewDiffEntry
Source§impl Debug for ReviewDiffEntry
impl Debug for ReviewDiffEntry
Source§impl<'de> Deserialize<'de> for ReviewDiffEntry
impl<'de> Deserialize<'de> for ReviewDiffEntry
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 ReviewDiffEntry
Source§impl PartialEq for ReviewDiffEntry
impl PartialEq for ReviewDiffEntry
Source§impl Serialize for ReviewDiffEntry
impl Serialize for ReviewDiffEntry
impl StructuralPartialEq for ReviewDiffEntry
Auto Trait Implementations§
impl Freeze for ReviewDiffEntry
impl RefUnwindSafe for ReviewDiffEntry
impl Send for ReviewDiffEntry
impl Sync for ReviewDiffEntry
impl Unpin for ReviewDiffEntry
impl UnsafeUnpin for ReviewDiffEntry
impl UnwindSafe for ReviewDiffEntry
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.