pub struct CastSOperation<'c> { /* private fields */ }
Expand description
A casts
operation. Index signed cast.
The index.casts
operation enables conversions between values of index type
and concrete fixed-width integer types. If casting to a wider integer, the
value is sign-extended. If casting to a narrower integer, the value is
truncated.
Example:
// Cast to i32
%0 = index.casts %a : index to i32
// Cast from i64
%1 = index.casts %b : i64 to index
Implementations§
source§impl<'c> CastSOperation<'c>
impl<'c> CastSOperation<'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>
) -> CastSOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> CastSOperationBuilder<'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<CastSOperation<'c>> for Operation<'c>
impl<'c> From<CastSOperation<'c>> for Operation<'c>
source§fn from(operation: CastSOperation<'c>) -> Self
fn from(operation: CastSOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for CastSOperation<'c>
impl<'c> !Send for CastSOperation<'c>
impl<'c> !Sync for CastSOperation<'c>
impl<'c> Unpin for CastSOperation<'c>
impl<'c> UnwindSafe for CastSOperation<'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