Struct PreparedComparison
pub struct PreparedComparison {
pub little_endian: i128,
pub big_endian: i128,
}
Expand description
A prepared comparison to an output value.
Comparison is quicker, because we can directly compare against an i128
instead of having to decode a Value
.
Fields§
§little_endian: i128
The expected little-endian value.
big_endian: i128
The expected big-endian value.
Implementations§
§impl PreparedComparison
impl PreparedComparison
§impl PreparedComparison
impl PreparedComparison
pub fn compare(
&self,
output_type: OutputType,
output_encoding: OutputEncoding,
result: i128,
) -> bool
pub fn compare( &self, output_type: OutputType, output_encoding: OutputEncoding, result: i128, ) -> bool
Performs the comparison given a specific output encoding.
pub fn compare_dual(
&self,
output_type: OutputType,
result: i128,
) -> CompareResult
pub fn compare_dual( &self, output_type: OutputType, result: i128, ) -> CompareResult
Performs the comparison for both output encodings.
Is more efficient than invoking Self::compare
twice.
Trait Implementations§
§impl Clone for PreparedComparison
impl Clone for PreparedComparison
§fn clone(&self) -> PreparedComparison
fn clone(&self) -> PreparedComparison
Returns a copy 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 PreparedComparison
impl Debug for PreparedComparison
§impl PartialEq for PreparedComparison
impl PartialEq for PreparedComparison
impl StructuralPartialEq for PreparedComparison
Auto Trait Implementations§
impl Freeze for PreparedComparison
impl RefUnwindSafe for PreparedComparison
impl Send for PreparedComparison
impl Sync for PreparedComparison
impl Unpin for PreparedComparison
impl UnwindSafe for PreparedComparison
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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