pub struct SSKRGroupSpec { /* private fields */ }
Expand description
Re-export of the Spec
type from the sskr
crate.
Describes the configuration for a Sharded Secret Key Reconstruction (SSKR) split, including the group threshold and specifications for each group. A specification for a group of shares within an SSKR split.
Implementations§
Source§impl GroupSpec
impl GroupSpec
Sourcepub fn new(
member_threshold: usize,
member_count: usize,
) -> Result<GroupSpec, Error>
pub fn new( member_threshold: usize, member_count: usize, ) -> Result<GroupSpec, Error>
Creates a new GroupSpec
instance with the given member threshold and
count.
§Arguments
member_threshold
- The minimum number of member shares required to reconstruct the secret within the group.member_count
- The total number of member shares in the group.
§Errors
Returns an error if the member count is zero, if the member count is greater than the maximum share count, or if the member threshold is greater than the member count.
Sourcepub fn member_threshold(&self) -> usize
pub fn member_threshold(&self) -> usize
Returns the member share threshold for this group.
Sourcepub fn member_count(&self) -> usize
pub fn member_count(&self) -> usize
Returns the number of member shares in this group.
Trait Implementations§
impl StructuralPartialEq for GroupSpec
Auto Trait Implementations§
impl Freeze for GroupSpec
impl RefUnwindSafe for GroupSpec
impl Send for GroupSpec
impl Sync for GroupSpec
impl Unpin for GroupSpec
impl UnwindSafe for GroupSpec
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