pub struct ResolutionEvent {
pub schema: String,
pub resolution_id: String,
pub attempt_id: String,
pub resolution: AttemptResolution,
pub actor: String,
pub at: String,
pub note: String,
}Expand description
An append-only lifecycle transition on an Attempt. Content-addressed
(vre_); authenticity comes from the signed attempt.resolved
crate::events::StateEvent it travels in (mirrors how a Contradiction’s
resolution is carried by a signed event, not self-signed).
Fields§
§schema: String§resolution_id: Stringvre_<16hex> over attempt_id | resolution | actor | at.
attempt_id: StringThe vat_ this resolves.
resolution: AttemptResolution§actor: StringThe named actor rendering the judgment (reviewer: / agent:).
at: StringISO-8601 valid time of the transition.
note: StringImplementations§
Source§impl ResolutionEvent
impl ResolutionEvent
Sourcepub fn new(
attempt_id: &str,
resolution: AttemptResolution,
actor: &str,
at: &str,
note: &str,
) -> Result<Self, String>
pub fn new( attempt_id: &str, resolution: AttemptResolution, actor: &str, at: &str, note: &str, ) -> Result<Self, String>
Build a resolution event, deriving its content-addressed id.
Sourcepub fn derive_id(&self) -> Result<String, String>
pub fn derive_id(&self) -> Result<String, String>
vre_<16hex> over the canonical body with the id zeroed.
Sourcepub fn to_state_event(&self, actor_type: &str, reason: &str) -> StateEvent
pub fn to_state_event(&self, actor_type: &str, reason: &str) -> StateEvent
Build the canonical attempt.resolved event carrying this transition.
Authenticity comes from the signed event log; the object travels in
payload.resolution.
Trait Implementations§
Source§impl Clone for ResolutionEvent
impl Clone for ResolutionEvent
Source§fn clone(&self) -> ResolutionEvent
fn clone(&self) -> ResolutionEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResolutionEvent
impl Debug for ResolutionEvent
Source§impl<'de> Deserialize<'de> for ResolutionEvent
impl<'de> Deserialize<'de> for ResolutionEvent
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 ResolutionEvent
Source§impl PartialEq for ResolutionEvent
impl PartialEq for ResolutionEvent
Source§impl Serialize for ResolutionEvent
impl Serialize for ResolutionEvent
impl StructuralPartialEq for ResolutionEvent
Auto Trait Implementations§
impl Freeze for ResolutionEvent
impl RefUnwindSafe for ResolutionEvent
impl Send for ResolutionEvent
impl Sync for ResolutionEvent
impl Unpin for ResolutionEvent
impl UnsafeUnpin for ResolutionEvent
impl UnwindSafe for ResolutionEvent
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
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§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.