pub struct RegistrationSnapshot { /* private fields */ }Expand description
Registrar snapshot of one operation. Fields are private: construction goes
through RegistrationSnapshot::new, which rejects terminal states
without exactly one matching resolution and nonterminal states carrying
one, so an inconsistent state/resolution pair is unrepresentable.
ⓘ
use hyprstream_resource::RegistrationSnapshot;
// No public fields or unchecked constructor exist.
let forged = RegistrationSnapshot {};Implementations§
Source§impl RegistrationSnapshot
impl RegistrationSnapshot
pub fn new( operation_id: OperationId, intent_digest: IntentDigest, state: RegistrarState, fencing_token: FencingToken, quarantine_reason: Option<QuarantineReason>, resolution: Option<ResolutionRef>, ) -> Result<Self, ContractError>
pub const fn operation_id(&self) -> OperationId
pub const fn intent_digest(&self) -> IntentDigest
pub const fn state(&self) -> RegistrarState
pub const fn fencing_token(&self) -> FencingToken
pub const fn quarantine_reason(&self) -> Option<QuarantineReason>
pub const fn resolution(&self) -> Option<&ResolutionRef>
Trait Implementations§
Source§impl Clone for RegistrationSnapshot
impl Clone for RegistrationSnapshot
Source§fn clone(&self) -> RegistrationSnapshot
fn clone(&self) -> RegistrationSnapshot
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 RegistrationSnapshot
impl Debug for RegistrationSnapshot
Source§impl PartialEq for RegistrationSnapshot
impl PartialEq for RegistrationSnapshot
Source§fn eq(&self, other: &RegistrationSnapshot) -> bool
fn eq(&self, other: &RegistrationSnapshot) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for RegistrationSnapshot
impl StructuralPartialEq for RegistrationSnapshot
Auto Trait Implementations§
impl Freeze for RegistrationSnapshot
impl RefUnwindSafe for RegistrationSnapshot
impl Send for RegistrationSnapshot
impl Sync for RegistrationSnapshot
impl Unpin for RegistrationSnapshot
impl UnsafeUnpin for RegistrationSnapshot
impl UnwindSafe for RegistrationSnapshot
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