pub struct Tholder { /* private fields */ }Expand description
Tholder is KERI Signing Threshold Satisfaction struct It evaluates satisfaction based on ordered list of indices of verified signatures where indices correspond to offsets in key list.
Implementations§
Source§impl Tholder
impl Tholder
Sourcepub fn new(
thold: Option<TholderThold>,
limen: Option<Vec<u8>>,
sith: Option<TholderSith>,
) -> Result<Self, MatterError>
pub fn new( thold: Option<TholderThold>, limen: Option<Vec<u8>>, sith: Option<TholderSith>, ) -> Result<Self, MatterError>
Sourcepub fn process_limen(
&mut self,
limen: &[u8],
strip: Option<bool>,
) -> Result<(), MatterError>
pub fn process_limen( &mut self, limen: &[u8], strip: Option<bool>, ) -> Result<(), MatterError>
Process limen input
§Arguments
limen- CESR encoded qb64 threshold (weighted or unweighted)strip- Optional flag to strip trailing pad bytes
Sourcepub fn process_sith(&mut self, sith: TholderSith) -> Result<(), MatterError>
pub fn process_sith(&mut self, sith: TholderSith) -> Result<(), MatterError>
Process attributes for fractionally weighted threshold sith
§Arguments
sith- Signing threshold (current or next) expressed as one of the TholderSith variants:- Integer: non-negative integer of threshold number (M-of-N threshold)
- HexString: non-negative hex string of threshold number (M-of-N threshold)
- SimpleWeights: a single clause of fractional weights
- ComplexWeights: multiple clauses of fractional weights (AND conditions)
Sourcepub fn sith(&self) -> TholderSith
pub fn sith(&self) -> TholderSith
Returns the JSON serializable threshold
Sourcepub fn weight(weight_str: &str) -> Result<Rational32, MatterError>
pub fn weight(weight_str: &str) -> Result<Rational32, MatterError>
Add the missing ValueError to the MatterError enum
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tholder
impl RefUnwindSafe for Tholder
impl Send for Tholder
impl Sync for Tholder
impl Unpin for Tholder
impl UnsafeUnpin for Tholder
impl UnwindSafe for Tholder
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