pub struct CastOptionsImpl {
pub wrapped: bool,
pub partial: bool,
}
Expand description
options defining how Cast kernels behave
Fields§
§wrapped: bool
default to false
whether an overflowing cast should be converted to None
(default), or be wrapped (i.e. 256i16 as u8 = 0
vectorized).
Settings this to true
is 5-6x faster for numeric types.
partial: bool
default to false whether to cast to an integer at the best-effort
Implementations§
Source§impl CastOptionsImpl
impl CastOptionsImpl
pub fn unchecked() -> CastOptionsImpl
Trait Implementations§
Source§impl Clone for CastOptionsImpl
impl Clone for CastOptionsImpl
Source§fn clone(&self) -> CastOptionsImpl
fn clone(&self) -> CastOptionsImpl
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 moreSource§impl Debug for CastOptionsImpl
impl Debug for CastOptionsImpl
Source§impl Default for CastOptionsImpl
impl Default for CastOptionsImpl
Source§fn default() -> CastOptionsImpl
fn default() -> CastOptionsImpl
Returns the “default value” for a type. Read more
Source§impl From<CastOptions> for CastOptionsImpl
impl From<CastOptions> for CastOptionsImpl
Source§fn from(value: CastOptions) -> Self
fn from(value: CastOptions) -> Self
Converts to this type from the input type.
impl Copy for CastOptionsImpl
Auto Trait Implementations§
impl Freeze for CastOptionsImpl
impl RefUnwindSafe for CastOptionsImpl
impl Send for CastOptionsImpl
impl Sync for CastOptionsImpl
impl Unpin for CastOptionsImpl
impl UnwindSafe for CastOptionsImpl
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§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