pub struct CastOperation<'c> { /* private fields */ }
Expand description
A cast
operation. Cast operation.
Performs a set of permissible cast operations
Mode | Input | Output |
---|---|---|
signed 8 to bool | int8 | Boolean |
signed 16 to bool | int16 | Boolean |
signed 32 to bool | int32 | Boolean |
bool to 8 | Boolean | int8 |
bool to 16 | Boolean | int16 |
bool to 32 | Boolean | int32 |
signed 8 to signed 16 | int8 | int16 |
signed 8 to signed 32 | int8 | int32 |
signed 16 to signed 8 | int16 | int8 |
signed 16 to signed 32 | int16 | int32 |
signed 32 to signed 8 | int32 | int8 |
signed 32 to signed 16 | int32 | int16 |
float to signed 8 | float | int8 |
float to signed 16 | float | int16 |
signed 8 to float | int8 | float |
signed 16 to float | int16 | float |
float 32 to float 64 | float32 | float64 |
float 64 to float 32 | float64 | float32 |
Implementations§
source§impl<'c> CastOperation<'c>
impl<'c> CastOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> CastOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> CastOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn output(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn input(&self) -> Result<Value<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<CastOperation<'c>> for Operation<'c>
impl<'c> From<CastOperation<'c>> for Operation<'c>
source§fn from(operation: CastOperation<'c>) -> Self
fn from(operation: CastOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for CastOperation<'c>
impl<'c> !Send for CastOperation<'c>
impl<'c> !Sync for CastOperation<'c>
impl<'c> Unpin for CastOperation<'c>
impl<'c> UnwindSafe for CastOperation<'c>
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