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