pub enum PolicyError {
NotEnoughItemsSelected(String),
IndexOutOfRange(usize),
AddOnLeaf,
AddOnPartialComplete,
MixedTimelockUnits,
IncompatibleConditions,
}
Expand description
Errors that can happen while extracting and manipulating policies
Variants§
NotEnoughItemsSelected(String)
Not enough items are selected to satisfy a SatisfiableItem::Thresh
or a SatisfiableItem::Multisig
IndexOutOfRange(usize)
Index out of range for an item to satisfy a SatisfiableItem::Thresh
or a SatisfiableItem::Multisig
AddOnLeaf
Can not add to an item that is Satisfaction::None
or Satisfaction::Complete
AddOnPartialComplete
Can not add to an item that is Satisfaction::PartialComplete
MixedTimelockUnits
Can not merge CSV or timelock values unless both are less than or both are equal or greater than 500_000_000
IncompatibleConditions
Incompatible conditions (not currently used)
Trait Implementations§
Source§impl Debug for PolicyError
impl Debug for PolicyError
Source§impl Display for PolicyError
impl Display for PolicyError
Source§impl Error for PolicyError
impl Error for PolicyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<PolicyError> for CreateTxError
impl From<PolicyError> for CreateTxError
Source§fn from(err: PolicyError) -> Self
fn from(err: PolicyError) -> Self
Converts to this type from the input type.
Source§impl From<PolicyError> for Error
impl From<PolicyError> for Error
Source§fn from(err: PolicyError) -> Self
fn from(err: PolicyError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PolicyError
impl PartialEq for PolicyError
impl Eq for PolicyError
impl StructuralPartialEq for PolicyError
Auto Trait Implementations§
impl Freeze for PolicyError
impl RefUnwindSafe for PolicyError
impl Send for PolicyError
impl Sync for PolicyError
impl Unpin for PolicyError
impl UnwindSafe for PolicyError
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more