pub struct SubOperation<'c> { /* private fields */ }
Expand description
A sub
operation. Index subtraction.
The index.sub
operation takes two index values and computes the difference
of the first from the second operand.
Example:
// c = a - b
%c = index.sub %a, %b
Implementations§
source§impl<'c> SubOperation<'c>
impl<'c> SubOperation<'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>
) -> SubOperationBuilder<'c, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> SubOperationBuilder<'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<SubOperation<'c>> for Operation<'c>
impl<'c> From<SubOperation<'c>> for Operation<'c>
source§fn from(operation: SubOperation<'c>) -> Self
fn from(operation: SubOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for SubOperation<'c>
impl<'c> !Send for SubOperation<'c>
impl<'c> !Sync for SubOperation<'c>
impl<'c> Unpin for SubOperation<'c>
impl<'c> UnwindSafe for SubOperation<'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