pub struct MatchValues<Clear>(/* private fields */);
Available on crate feature
integer
only.Expand description
MatchValues for the match_value_parallelized
family of function
This ensures the uniqueness of the inputs
Outputs are not required to be unique
Input values are not required to span all possible values that
ct
could hold.
Implementations§
Source§impl<Clear> MatchValues<Clear>
impl<Clear> MatchValues<Clear>
Sourcepub fn new(matches: Vec<(Clear, Clear)>) -> Result<Self>
pub fn new(matches: Vec<(Clear, Clear)>) -> Result<Self>
Builds a MatchValues
from a Vec of tuple where in each tuple element,
the index .0
is the input and index .1
is the associated output.
This checks that all .0
elements are unique
Sourcepub fn from_fn_and_range<F>(func: F, range: Range<Clear>) -> Self
pub fn from_fn_and_range<F>(func: F, range: Range<Clear>) -> Self
Builds a MatchValues
by applying the given function over the given range
pub fn get_values(&self) -> &Vec<(Clear, Clear)>
Trait Implementations§
Auto Trait Implementations§
impl<Clear> Freeze for MatchValues<Clear>
impl<Clear> RefUnwindSafe for MatchValues<Clear>where
Clear: RefUnwindSafe,
impl<Clear> Send for MatchValues<Clear>where
Clear: Send,
impl<Clear> Sync for MatchValues<Clear>where
Clear: Sync,
impl<Clear> Unpin for MatchValues<Clear>where
Clear: Unpin,
impl<Clear> UnwindSafe for MatchValues<Clear>where
Clear: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more