pub struct DivUOperation<'c> { /* private fields */ }
Expand description
A divu
operation. Index unsigned division.
The index.divu
operation takes two index values and computes their
unsigned quotient. Treats the leading bit as the most significant and rounds
towards zero, i.e. 6 / -2 = 0
.
Note: division by zero is undefined behaviour.
Example:
// c = a / b
%c = index.divu %a, %b
Implementations§
source§impl<'c> DivUOperation<'c>
impl<'c> DivUOperation<'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>
) -> DivUOperationBuilder<'c, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> DivUOperationBuilder<'c, Unset, Unset, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn lhs(&self) -> Result<Value<'c, '_>, Error>
pub fn rhs(&self) -> Result<Value<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<DivUOperation<'c>> for Operation<'c>
impl<'c> From<DivUOperation<'c>> for Operation<'c>
source§fn from(operation: DivUOperation<'c>) -> Self
fn from(operation: DivUOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for DivUOperation<'c>
impl<'c> !Send for DivUOperation<'c>
impl<'c> !Sync for DivUOperation<'c>
impl<'c> Unpin for DivUOperation<'c>
impl<'c> UnwindSafe for DivUOperation<'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