pub struct ClaimState {
pub reference: Option<String>,
pub attachment: Option<AttachmentId>,
pub proposal: Option<Proposal>,
pub recorded: Vec<RecordedField>,
pub abandoned_from: Option<AttachmentId>,
pub status: ClaimStatus,
}Expand description
The persisted claim case.
Fields§
§reference: Option<String>A reference the user types by hand.
It exists to be outside every proposal: editing it while a review is open must not change what the review card is about, which is what makes “the payload hash covers the proposal rather than the whole state” a testable sentence rather than a slogan.
attachment: Option<AttachmentId>The document that arrived, once it has.
proposal: Option<Proposal>Values read from the document and awaiting review.
recorded: Vec<RecordedField>Values that survived a review, with their provenance.
abandoned_from: Option<AttachmentId>The document whose reading the user threw away, when they did.
status: ClaimStatusLifecycle status.
Implementations§
Source§impl ClaimState
impl ClaimState
Sourcepub fn open_obligations(&self) -> Vec<ClaimObligation>
pub fn open_obligations(&self) -> Vec<ClaimObligation>
The obligations open in this state, in a stable order.
While a review is open there is one obligation per proposed field and one per missing required field. Both are parameterized, so three proposed values are three distinct obligations rather than one checkpoint that flickers as the user works through them.
Sourcepub fn recorded_value(&self, field: ClaimField) -> Option<&str>
pub fn recorded_value(&self, field: ClaimField) -> Option<&str>
The recorded value of a field, when the review put one there.
Sourcepub const fn is_awaiting_review(&self) -> bool
pub const fn is_awaiting_review(&self) -> bool
Returns true when a review is open.
Trait Implementations§
Source§impl Clone for ClaimState
impl Clone for ClaimState
Source§impl Debug for ClaimState
impl Debug for ClaimState
Source§impl Default for ClaimState
impl Default for ClaimState
Source§impl<'de> Deserialize<'de> for ClaimState
impl<'de> Deserialize<'de> for ClaimState
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 ClaimState
Source§impl PartialEq for ClaimState
impl PartialEq for ClaimState
Source§impl Serialize for ClaimState
impl Serialize for ClaimState
impl StructuralPartialEq for ClaimState
Auto Trait Implementations§
impl Freeze for ClaimState
impl RefUnwindSafe for ClaimState
impl Send for ClaimState
impl Sync for ClaimState
impl Unpin for ClaimState
impl UnsafeUnpin for ClaimState
impl UnwindSafe for ClaimState
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
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
key and return true if they are equal.