pub struct PartyOptions<V> { /* private fields */ }
Available on crate features
cggmp
or frost-ed25519
only.Expand description
Options for a party participating in a protocol.
Implementations§
Source§impl<V> PartyOptions<V>
impl<V> PartyOptions<V>
Sourcepub fn new(
public_key: Vec<u8>,
participants: Vec<Vec<u8>>,
is_initiator: bool,
verifiers: Vec<V>,
) -> Result<Self>
pub fn new( public_key: Vec<u8>, participants: Vec<Vec<u8>>, is_initiator: bool, verifiers: Vec<V>, ) -> Result<Self>
Create new party participant options.
Sourcepub fn public_key(&self) -> &[u8] ⓘ
pub fn public_key(&self) -> &[u8] ⓘ
Public key of this participant.
Sourcepub fn participants(&self) -> &[Vec<u8>]
pub fn participants(&self) -> &[Vec<u8>]
Participant public keys.
Sourcepub fn party_index(&self) -> usize
pub fn party_index(&self) -> usize
Index of this participant.
Sourcepub fn is_initiator(&self) -> bool
pub fn is_initiator(&self) -> bool
Whether this party is the session initator.
Trait Implementations§
Source§impl<V: Clone> Clone for PartyOptions<V>
impl<V: Clone> Clone for PartyOptions<V>
Source§fn clone(&self) -> PartyOptions<V>
fn clone(&self) -> PartyOptions<V>
Returns a copy 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<V: Debug> Debug for PartyOptions<V>
impl<V: Debug> Debug for PartyOptions<V>
Source§impl<'de, V> Deserialize<'de> for PartyOptions<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for PartyOptions<V>where
V: Deserialize<'de>,
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<V> Freeze for PartyOptions<V>
impl<V> RefUnwindSafe for PartyOptions<V>where
V: RefUnwindSafe,
impl<V> Send for PartyOptions<V>where
V: Send,
impl<V> Sync for PartyOptions<V>where
V: Sync,
impl<V> Unpin for PartyOptions<V>where
V: Unpin,
impl<V> UnwindSafe for PartyOptions<V>where
V: 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