Enum OutputType
pub enum OutputType {
Number {
mask: NonZeroU64,
},
Bytes {
num_bytes: usize,
},
}
Expand description
An optimized representation of an output type.
In case of IoType::Integer
, this representation pre-computes the bitmask needed to perform equality comparisons.
Variants§
Number
An integer output. Usually Value::Num
or OwnedValue::Num
.
Fields
§
mask: NonZeroU64
A mask that can be applied to an u64
to crop the u64
to the correct value.
Bytes
A byte output. Usually Value::Bytes
or OwnedValue::Bytes
.
Implementations§
§impl OutputType
impl OutputType
pub const fn const_from(value: IoType) -> Self
pub const fn const_from(value: IoType) -> Self
Constructs the output type from an IoType
.
Trait Implementations§
§impl Clone for OutputType
impl Clone for OutputType
§fn clone(&self) -> OutputType
fn clone(&self) -> OutputType
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 OutputType
impl Debug for OutputType
§impl From<IoType> for OutputType
impl From<IoType> for OutputType
§impl PartialEq for OutputType
impl PartialEq for OutputType
impl Copy for OutputType
impl StructuralPartialEq for OutputType
Auto Trait Implementations§
impl Freeze for OutputType
impl RefUnwindSafe for OutputType
impl Send for OutputType
impl Sync for OutputType
impl Unpin for OutputType
impl UnwindSafe for OutputType
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