pub enum Error {
NoRoot,
InvalidRate,
InvalidStructure,
}Variants§
NoRoot
First bucket passed to HTB::new must be a node with parent set to None
InvalidRate
Calculated flow rate is higher that what can fit into usize
flow rate is calculated using least common multiplier and if it is very small HTB ends up sing their product which can overflow. To fix this problem try to tweak the values to have bigger LCM. For example instead of using 881 and 883 (both are prime numbers) try using 882
InvalidStructure
Invalid config passed to HTB:
Buckets should be given in depth first search traversal order:
- root with
parentset to None - higher priority child of the root
- followed by high priority child of the child, if any, etc.
- followed by the next child
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(_: TryFromIntError) -> Self
fn from(_: TryFromIntError) -> Self
Converts to this type from the input type.
impl Copy for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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