Enum WeightError
pub enum WeightError {
Empty,
Capacity,
ZeroTotal,
Overflow,
}Expand description
Compatibility error categories returned by WeightedTable::new.
Use WeightedTable::try_new for entry-specific diagnostics.
Variants§
Empty
No entries were supplied.
Capacity
More than WeightedTable::MAX_ENTRIES entries were supplied.
ZeroTotal
Every entry has zero weight.
Overflow
Adding an entry’s weight would exceed u64::MAX.
Trait Implementations§
§impl Clone for WeightError
impl Clone for WeightError
§fn clone(&self) -> WeightError
fn clone(&self) -> WeightError
Returns a duplicate 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 more§impl Debug for WeightError
impl Debug for WeightError
§impl Display for WeightError
impl Display for WeightError
§impl Error for WeightError
impl Error for WeightError
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()
§impl From<WeightValidationError> for WeightError
impl From<WeightValidationError> for WeightError
§fn from(error: WeightValidationError) -> WeightError
fn from(error: WeightValidationError) -> WeightError
Converts to this type from the input type.
§impl PartialEq for WeightError
impl PartialEq for WeightError
impl Copy for WeightError
impl Eq for WeightError
impl StructuralPartialEq for WeightError
Auto Trait Implementations§
impl Freeze for WeightError
impl RefUnwindSafe for WeightError
impl Send for WeightError
impl Sync for WeightError
impl Unpin for WeightError
impl UnwindSafe for WeightError
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