pub struct Spec { /* private fields */ }
Expand description
A specification for an SSKR split.
Implementations§
source§impl Spec
impl Spec
sourcepub fn new(
group_threshold: usize,
groups: Vec<GroupSpec>
) -> Result<Self, SSKRError>
pub fn new( group_threshold: usize, groups: Vec<GroupSpec> ) -> Result<Self, SSKRError>
Creates a new Spec
instance with the given group threshold and groups.
§Arguments
group_threshold
- The minimum number of groups required to reconstruct the secret.groups
- The list ofGroupSpec
instances that define the groups and their members.
§Errors
Returns an error if the group threshold is zero, if the group threshold is greater than the number of groups, or if the number of groups is greater than the maximum share count.
sourcepub fn group_threshold(&self) -> usize
pub fn group_threshold(&self) -> usize
Returns the group threshold.
sourcepub fn group_count(&self) -> usize
pub fn group_count(&self) -> usize
Returns the number of groups.
Returns the total number of shares across all groups.
Trait Implementations§
source§impl PartialEq for Spec
impl PartialEq for Spec
impl StructuralPartialEq for Spec
Auto Trait Implementations§
impl Freeze for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnwindSafe for Spec
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