pub struct ThresholdConfig {
pub threshold: u16,
pub total_shares: u16,
}Expand description
Configuration for a threshold signature scheme.
Fields§
§threshold: u16Minimum number of shares required to sign.
Total number of shares to generate.
Implementations§
Source§impl ThresholdConfig
impl ThresholdConfig
Sourcepub fn new(threshold: u16, total_shares: u16) -> Result<Self>
pub fn new(threshold: u16, total_shares: u16) -> Result<Self>
Create a new threshold configuration.
Requires: threshold >= 2, total_shares >= threshold, total_shares <= 255.
Sourcepub fn two_of_three() -> Self
pub fn two_of_three() -> Self
Create a 2-of-3 threshold configuration.
Sourcepub fn three_of_five() -> Self
pub fn three_of_five() -> Self
Create a 3-of-5 threshold configuration.
Trait Implementations§
Source§impl Clone for ThresholdConfig
impl Clone for ThresholdConfig
impl Copy for ThresholdConfig
Auto Trait Implementations§
impl Forget for ThresholdConfig
impl Freeze for ThresholdConfig
impl Move for ThresholdConfig
impl RefUnwindSafe for ThresholdConfig
impl Send for ThresholdConfig
impl Sync for ThresholdConfig
impl Unpin for ThresholdConfig
impl UnsafeUnpin for ThresholdConfig
impl UnwindSafe for ThresholdConfig
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