pub enum RHS<'a, R> {
Unsorted(&'a [R]),
Sorted(&'a [R]),
}Expand description
A wrapper around the right-hand side of your join.
Variants§
Unsorted(&'a [R])
Input which is not (necessarily) sorted. Searches of RHS will be O(n).
This variant can be explicitly created with RHS::new_unsorted or
implicitly via the impl From<&[R]>.
Sorted(&'a [R])
Input which is known to be sorted according to the join predicate. Searches of RHS will be O(lg n)
This variant is explicitly created with RHS::new_sorted
Implementations§
Source§impl<'a, R> RHS<'a, R>
impl<'a, R> RHS<'a, R>
Sourcepub fn new_unsorted(rhs: &'a [R]) -> Self
pub fn new_unsorted(rhs: &'a [R]) -> Self
Create a new RHS from the given slice.
Provided records will be searched linearly.
Sourcepub fn new_sorted(rhs: &'a [R]) -> Self
pub fn new_sorted(rhs: &'a [R]) -> Self
Create a new RHS from the given slice where records are assumed to be sorted according to how they will be searched.
Provided records will be binary searched, yielding faster searches.
Trait Implementations§
Auto Trait Implementations§
impl<'a, R> Freeze for RHS<'a, R>
impl<'a, R> RefUnwindSafe for RHS<'a, R>where
R: RefUnwindSafe,
impl<'a, R> Send for RHS<'a, R>where
R: Sync,
impl<'a, R> Sync for RHS<'a, R>where
R: Sync,
impl<'a, R> Unpin for RHS<'a, R>
impl<'a, R> UnwindSafe for RHS<'a, R>where
R: RefUnwindSafe,
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