#[non_exhaustive]pub enum TreapError {
UnsortedInput {
index: usize,
},
OverlappingRange,
}Expand description
The one fallible operation’s error.
Every other method on Treap is total: lookups return Option, removals
of an absent key are a no-op, and there is no capacity to exhaust short of
the allocator failing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnsortedInput
from_sorted received input that is not strictly ascending. index is
the position of the offending item.
OverlappingRange
join was handed two treaps whose key ranges overlap. Joining them
would break the BST invariant, so the operation is refused and both
treaps are left untouched.
Trait Implementations§
Source§impl Clone for TreapError
impl Clone for TreapError
Source§fn clone(&self) -> TreapError
fn clone(&self) -> TreapError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TreapError
impl Debug for TreapError
Source§impl Display for TreapError
impl Display for TreapError
impl Eq for TreapError
Source§impl Error for TreapError
impl Error for TreapError
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 PartialEq for TreapError
impl PartialEq for TreapError
impl StructuralPartialEq for TreapError
Auto Trait Implementations§
impl Freeze for TreapError
impl RefUnwindSafe for TreapError
impl Send for TreapError
impl Sync for TreapError
impl Unpin for TreapError
impl UnsafeUnpin for TreapError
impl UnwindSafe for TreapError
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