Struct ssss::SsssConfig
source · pub struct SsssConfig { /* private fields */ }
Expand description
Configuration used to drive the gen_shares
function.
Notes
The default configuration will specify 5 shares with a
threshold of 3. The maximum secret size is u16::MAX
(65536)
Implementations§
source§impl SsssConfig
impl SsssConfig
The total shares to be generate from a secret
sourcepub fn set_threshold(&mut self, val: u8) -> &mut Self
pub fn set_threshold(&mut self, val: u8) -> &mut Self
The threshold of valid shares required to unlock a secret This must be less than or equal to the number of shares
sourcepub fn set_max_secret_size(&mut self, val: usize) -> &mut Self
pub fn set_max_secret_size(&mut self, val: usize) -> &mut Self
The maximum secret size in bytes
Trait Implementations§
source§impl Clone for SsssConfig
impl Clone for SsssConfig
source§fn clone(&self) -> SsssConfig
fn clone(&self) -> SsssConfig
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 Debug for SsssConfig
impl Debug for SsssConfig
source§impl Default for SsssConfig
impl Default for SsssConfig
source§impl<'de> Deserialize<'de> for SsssConfig
impl<'de> Deserialize<'de> for SsssConfig
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
source§impl Serialize for SsssConfig
impl Serialize for SsssConfig
impl Copy for SsssConfig
Auto Trait Implementations§
impl RefUnwindSafe for SsssConfig
impl Send for SsssConfig
impl Sync for SsssConfig
impl Unpin for SsssConfig
impl UnwindSafe for SsssConfig
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