pub struct ObligationRecord {
pub id: GovernanceLogId,
pub created_at: DateTime<Utc>,
pub chain_seq: u64,
pub obligation: Obligation,
pub state: ObligationState,
}Expand description
One obligation entry as the log has it now: its latest version, and what its amendments add up to (0.73)
Fields§
§id: GovernanceLogId§created_at: DateTime<Utc>§chain_seq: u64§obligation: ObligationIts latest version, every revision applied
state: ObligationStateWhat its amendments add up to
Implementations§
Source§impl ObligationRecord
impl ObligationRecord
Sourcepub fn from_log(
id: GovernanceLogId,
created_at: DateTime<Utc>,
chain_seq: u64,
data: &Value,
amendments: &[(DateTime<Utc>, Amendment)],
) -> Result<Self, ObligationRecordError>
pub fn from_log( id: GovernanceLogId, created_at: DateTime<Utc>, chain_seq: u64, data: &Value, amendments: &[(DateTime<Utc>, Amendment)], ) -> Result<Self, ObligationRecordError>
The entry id with its stored data, after amendments: those
naming it, with their created_at, in chain order. Revisions are
applied to data for the latest version, and the state is folded
from all of them (ObligationState::from_amendments).
Trait Implementations§
Source§impl Clone for ObligationRecord
impl Clone for ObligationRecord
Source§impl Debug for ObligationRecord
impl Debug for ObligationRecord
impl Eq for ObligationRecord
Source§impl PartialEq for ObligationRecord
impl PartialEq for ObligationRecord
impl StructuralPartialEq for ObligationRecord
Auto Trait Implementations§
impl Freeze for ObligationRecord
impl RefUnwindSafe for ObligationRecord
impl Send for ObligationRecord
impl Sync for ObligationRecord
impl Unpin for ObligationRecord
impl UnsafeUnpin for ObligationRecord
impl UnwindSafe for ObligationRecord
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.