pub struct SwitchOperation<'c> { /* private fields */ }Expand description
A switch operation.
Implementations§
Source§impl<'c> SwitchOperation<'c>
impl<'c> SwitchOperation<'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>,
) -> SwitchOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c>, ) -> SwitchOperationBuilder<'c, Unset, Unset, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn value(&self) -> Result<Value<'c, '_>, Error>
pub fn default_operands( &self, ) -> Result<impl Iterator<Item = Value<'c, '_>>, Error>
pub fn case_operands( &self, ) -> Result<impl Iterator<Item = Value<'c, '_>>, Error>
pub fn default_destination(&self) -> Result<BlockRef<'c, '_>, Error>
pub fn case_destinations(&self) -> impl Iterator<Item = BlockRef<'c, '_>>
pub fn case_values(&self) -> Result<Attribute<'c>, Error>
pub fn set_case_values(&mut self, value: Attribute<'c>)
pub fn remove_case_values(&mut self) -> Result<(), Error>
pub fn case_operand_segments(&self) -> Result<DenseI32ArrayAttribute<'c>, Error>
pub fn set_case_operand_segments(&mut self, value: DenseI32ArrayAttribute<'c>)
pub fn branch_weights(&self) -> Result<DenseI32ArrayAttribute<'c>, Error>
pub fn set_branch_weights(&mut self, value: DenseI32ArrayAttribute<'c>)
pub fn remove_branch_weights(&mut self) -> Result<(), Error>
Trait Implementations§
Source§impl<'c> Clone for SwitchOperation<'c>
impl<'c> Clone for SwitchOperation<'c>
Source§fn clone(&self) -> SwitchOperation<'c>
fn clone(&self) -> SwitchOperation<'c>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'c> Debug for SwitchOperation<'c>
impl<'c> Debug for SwitchOperation<'c>
Source§impl<'b> From<SwitchOperation<'b>> for LlvmDialectOperation<'b>
impl<'b> From<SwitchOperation<'b>> for LlvmDialectOperation<'b>
Source§fn from(op: SwitchOperation<'b>) -> Self
fn from(op: SwitchOperation<'b>) -> Self
Converts to this type from the input type.
Source§impl<'c> From<SwitchOperation<'c>> for Operation<'c>
impl<'c> From<SwitchOperation<'c>> for Operation<'c>
Source§fn from(operation: SwitchOperation<'c>) -> Self
fn from(operation: SwitchOperation<'c>) -> Self
Converts to this type from the input type.
Source§impl<'c> PartialEq for SwitchOperation<'c>
impl<'c> PartialEq for SwitchOperation<'c>
Source§impl<'c> TryFrom<Operation<'c>> for SwitchOperation<'c>
impl<'c> TryFrom<Operation<'c>> for SwitchOperation<'c>
impl<'c> Eq for SwitchOperation<'c>
impl<'c> StructuralPartialEq for SwitchOperation<'c>
Auto Trait Implementations§
impl<'c> Freeze for SwitchOperation<'c>
impl<'c> RefUnwindSafe for SwitchOperation<'c>
impl<'c> !Send for SwitchOperation<'c>
impl<'c> !Sync for SwitchOperation<'c>
impl<'c> Unpin for SwitchOperation<'c>
impl<'c> UnwindSafe for SwitchOperation<'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