pub struct TwoPartyState<KB: KeyBundle> { /* private fields */ }Expand description
State of 2SM session between two members.
All 2SM methods are expressed as “pure functions” without any side-effects, returning an updated state object. This allows applications to be more crash-resiliant, persisting the final state only when all processes have successfully completed.
The state is serializable and can be used to persist 2SM sessions.
Trait Implementations§
Source§impl<KB: Clone + KeyBundle> Clone for TwoPartyState<KB>
impl<KB: Clone + KeyBundle> Clone for TwoPartyState<KB>
Source§fn clone(&self) -> TwoPartyState<KB>
fn clone(&self) -> TwoPartyState<KB>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de, KB> Deserialize<'de> for TwoPartyState<KB>where
KB: Deserialize<'de> + KeyBundle,
impl<'de, KB> Deserialize<'de> for TwoPartyState<KB>where
KB: Deserialize<'de> + KeyBundle,
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
Auto Trait Implementations§
impl<KB> Freeze for TwoPartyState<KB>where
KB: Freeze,
impl<KB> RefUnwindSafe for TwoPartyState<KB>where
KB: RefUnwindSafe,
impl<KB> Send for TwoPartyState<KB>where
KB: Send,
impl<KB> Sync for TwoPartyState<KB>where
KB: Sync,
impl<KB> Unpin for TwoPartyState<KB>where
KB: Unpin,
impl<KB> UnwindSafe for TwoPartyState<KB>where
KB: UnwindSafe,
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