Enum rspirv::dr::Operand

source ·
pub enum Operand {
Show 45 variants ImageOperands(ImageOperands), FPFastMathMode(FPFastMathMode), SelectionControl(SelectionControl), LoopControl(LoopControl), FunctionControl(FunctionControl), MemorySemantics(MemorySemantics), MemoryAccess(MemoryAccess), KernelProfilingInfo(KernelProfilingInfo), RayFlags(RayFlags), FragmentShadingRate(FragmentShadingRate), SourceLanguage(SourceLanguage), ExecutionModel(ExecutionModel), AddressingModel(AddressingModel), MemoryModel(MemoryModel), ExecutionMode(ExecutionMode), StorageClass(StorageClass), Dim(Dim), SamplerAddressingMode(SamplerAddressingMode), SamplerFilterMode(SamplerFilterMode), ImageFormat(ImageFormat), ImageChannelOrder(ImageChannelOrder), ImageChannelDataType(ImageChannelDataType), FPRoundingMode(FPRoundingMode), LinkageType(LinkageType), AccessQualifier(AccessQualifier), FunctionParameterAttribute(FunctionParameterAttribute), Decoration(Decoration), BuiltIn(BuiltIn), Scope(Scope), GroupOperation(GroupOperation), KernelEnqueueFlags(KernelEnqueueFlags), Capability(Capability), RayQueryIntersection(RayQueryIntersection), RayQueryCommittedIntersectionType(RayQueryCommittedIntersectionType), RayQueryCandidateIntersectionType(RayQueryCandidateIntersectionType), IdMemorySemantics(Word), IdScope(Word), IdRef(Word), LiteralInt32(u32), LiteralInt64(u64), LiteralFloat32(f32), LiteralFloat64(f64), LiteralExtInstInteger(u32), LiteralSpecConstantOpInteger(Op), LiteralString(String),
}
Expand description

Data representation of a SPIR-V operand.

Variants§

§

ImageOperands(ImageOperands)

§

FPFastMathMode(FPFastMathMode)

§

SelectionControl(SelectionControl)

§

LoopControl(LoopControl)

§

FunctionControl(FunctionControl)

§

MemorySemantics(MemorySemantics)

§

MemoryAccess(MemoryAccess)

§

KernelProfilingInfo(KernelProfilingInfo)

§

RayFlags(RayFlags)

§

FragmentShadingRate(FragmentShadingRate)

§

SourceLanguage(SourceLanguage)

§

ExecutionModel(ExecutionModel)

§

AddressingModel(AddressingModel)

§

MemoryModel(MemoryModel)

§

ExecutionMode(ExecutionMode)

§

StorageClass(StorageClass)

§

Dim(Dim)

§

SamplerAddressingMode(SamplerAddressingMode)

§

SamplerFilterMode(SamplerFilterMode)

§

ImageFormat(ImageFormat)

§

ImageChannelOrder(ImageChannelOrder)

§

ImageChannelDataType(ImageChannelDataType)

§

FPRoundingMode(FPRoundingMode)

§

LinkageType(LinkageType)

§

AccessQualifier(AccessQualifier)

§

FunctionParameterAttribute(FunctionParameterAttribute)

§

Decoration(Decoration)

§

BuiltIn(BuiltIn)

§

Scope(Scope)

§

GroupOperation(GroupOperation)

§

KernelEnqueueFlags(KernelEnqueueFlags)

§

Capability(Capability)

§

RayQueryIntersection(RayQueryIntersection)

§

RayQueryCommittedIntersectionType(RayQueryCommittedIntersectionType)

§

RayQueryCandidateIntersectionType(RayQueryCandidateIntersectionType)

§

IdMemorySemantics(Word)

§

IdScope(Word)

§

IdRef(Word)

§

LiteralInt32(u32)

§

LiteralInt64(u64)

§

LiteralFloat32(f32)

§

LiteralFloat64(f64)

§

LiteralExtInstInteger(u32)

§

LiteralSpecConstantOpInteger(Op)

§

LiteralString(String)

Implementations§

source§

impl Operand

source

pub fn unwrap_image_operands(&self) -> ImageOperands

source

pub fn unwrap_fp_fast_math_mode(&self) -> FPFastMathMode

source

pub fn unwrap_selection_control(&self) -> SelectionControl

source

pub fn unwrap_loop_control(&self) -> LoopControl

source

pub fn unwrap_function_control(&self) -> FunctionControl

source

pub fn unwrap_memory_semantics(&self) -> MemorySemantics

source

pub fn unwrap_memory_access(&self) -> MemoryAccess

source

pub fn unwrap_kernel_profiling_info(&self) -> KernelProfilingInfo

source

pub fn unwrap_ray_flags(&self) -> RayFlags

source

pub fn unwrap_fragment_shading_rate(&self) -> FragmentShadingRate

source

pub fn unwrap_source_language(&self) -> SourceLanguage

source

pub fn unwrap_execution_model(&self) -> ExecutionModel

source

pub fn unwrap_addressing_model(&self) -> AddressingModel

source

pub fn unwrap_memory_model(&self) -> MemoryModel

source

pub fn unwrap_execution_mode(&self) -> ExecutionMode

source

pub fn unwrap_storage_class(&self) -> StorageClass

source

pub fn unwrap_dim(&self) -> Dim

source

pub fn unwrap_sampler_addressing_mode(&self) -> SamplerAddressingMode

source

pub fn unwrap_sampler_filter_mode(&self) -> SamplerFilterMode

source

pub fn unwrap_image_format(&self) -> ImageFormat

source

pub fn unwrap_image_channel_order(&self) -> ImageChannelOrder

source

pub fn unwrap_image_channel_data_type(&self) -> ImageChannelDataType

source

pub fn unwrap_fp_rounding_mode(&self) -> FPRoundingMode

source

pub fn unwrap_linkage_type(&self) -> LinkageType

source

pub fn unwrap_access_qualifier(&self) -> AccessQualifier

source

pub fn unwrap_function_parameter_attribute(&self) -> FunctionParameterAttribute

source

pub fn unwrap_decoration(&self) -> Decoration

source

pub fn unwrap_built_in(&self) -> BuiltIn

source

pub fn unwrap_scope(&self) -> Scope

source

pub fn unwrap_group_operation(&self) -> GroupOperation

source

pub fn unwrap_kernel_enqueue_flags(&self) -> KernelEnqueueFlags

source

pub fn unwrap_capability(&self) -> Capability

source

pub fn unwrap_ray_query_intersection(&self) -> RayQueryIntersection

source

pub fn unwrap_ray_query_committed_intersection_type( &self ) -> RayQueryCommittedIntersectionType

source

pub fn unwrap_ray_query_candidate_intersection_type( &self ) -> RayQueryCandidateIntersectionType

source

pub fn unwrap_id_memory_semantics(&self) -> Word

source

pub fn unwrap_id_scope(&self) -> Word

source

pub fn unwrap_id_ref(&self) -> Word

source

pub fn unwrap_literal_int32(&self) -> u32

source

pub fn unwrap_literal_int64(&self) -> u64

source

pub fn unwrap_literal_float32(&self) -> f32

source

pub fn unwrap_literal_float64(&self) -> f64

source

pub fn unwrap_literal_ext_inst_integer(&self) -> u32

source

pub fn unwrap_literal_spec_constant_op_integer(&self) -> Op

source

pub fn unwrap_literal_string(&self) -> &str

source

pub fn id_ref_any(&self) -> Option<Word>

source

pub fn id_ref_any_mut(&mut self) -> Option<&mut Word>

source

pub fn required_capabilities(&self) -> Vec<Capability>

source

pub fn required_extensions(&self) -> Vec<&'static str>

source

pub fn additional_operands(&self) -> Vec<LogicalOperand>

Trait Implementations§

source§

impl Assemble for Operand

source§

fn assemble_into(&self, result: &mut Vec<u32>)

Assembles the current object into the result vector, reducing the need for lots of allocations
source§

fn assemble(&self) -> Vec<u32>

Assembles the current object and returns the binary code. Helper method to remain backwards compatible, calls assemble_into
source§

impl Clone for Operand

source§

fn clone(&self) -> Operand

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Operand

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Disassemble for Operand

source§

fn disassemble(&self) -> String

Disassembles the current object and returns the assembly code.
source§

impl Display for Operand

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<&'a str> for Operand

source§

fn from(val: &'a str) -> Self

Converts to this type from the input type.
source§

impl From<AccessQualifier> for Operand

source§

fn from(o: AccessQualifier) -> Self

Converts to this type from the input type.
source§

impl From<AddressingModel> for Operand

source§

fn from(o: AddressingModel) -> Self

Converts to this type from the input type.
source§

impl From<BuiltIn> for Operand

source§

fn from(o: BuiltIn) -> Self

Converts to this type from the input type.
source§

impl From<Capability> for Operand

source§

fn from(o: Capability) -> Self

Converts to this type from the input type.
source§

impl From<Decoration> for Operand

source§

fn from(o: Decoration) -> Self

Converts to this type from the input type.
source§

impl From<Dim> for Operand

source§

fn from(o: Dim) -> Self

Converts to this type from the input type.
source§

impl From<ExecutionMode> for Operand

source§

fn from(o: ExecutionMode) -> Self

Converts to this type from the input type.
source§

impl From<ExecutionModel> for Operand

source§

fn from(o: ExecutionModel) -> Self

Converts to this type from the input type.
source§

impl From<FPFastMathMode> for Operand

source§

fn from(o: FPFastMathMode) -> Self

Converts to this type from the input type.
source§

impl From<FPRoundingMode> for Operand

source§

fn from(o: FPRoundingMode) -> Self

Converts to this type from the input type.
source§

impl From<FragmentShadingRate> for Operand

source§

fn from(o: FragmentShadingRate) -> Self

Converts to this type from the input type.
source§

impl From<FunctionControl> for Operand

source§

fn from(o: FunctionControl) -> Self

Converts to this type from the input type.
source§

impl From<FunctionParameterAttribute> for Operand

source§

fn from(o: FunctionParameterAttribute) -> Self

Converts to this type from the input type.
source§

impl From<GroupOperation> for Operand

source§

fn from(o: GroupOperation) -> Self

Converts to this type from the input type.
source§

impl From<ImageChannelDataType> for Operand

source§

fn from(o: ImageChannelDataType) -> Self

Converts to this type from the input type.
source§

impl From<ImageChannelOrder> for Operand

source§

fn from(o: ImageChannelOrder) -> Self

Converts to this type from the input type.
source§

impl From<ImageFormat> for Operand

source§

fn from(o: ImageFormat) -> Self

Converts to this type from the input type.
source§

impl From<ImageOperands> for Operand

source§

fn from(o: ImageOperands) -> Self

Converts to this type from the input type.
source§

impl From<KernelEnqueueFlags> for Operand

source§

fn from(o: KernelEnqueueFlags) -> Self

Converts to this type from the input type.
source§

impl From<KernelProfilingInfo> for Operand

source§

fn from(o: KernelProfilingInfo) -> Self

Converts to this type from the input type.
source§

impl From<LinkageType> for Operand

source§

fn from(o: LinkageType) -> Self

Converts to this type from the input type.
source§

impl From<LoopControl> for Operand

source§

fn from(o: LoopControl) -> Self

Converts to this type from the input type.
source§

impl From<MemoryAccess> for Operand

source§

fn from(o: MemoryAccess) -> Self

Converts to this type from the input type.
source§

impl From<MemoryModel> for Operand

source§

fn from(o: MemoryModel) -> Self

Converts to this type from the input type.
source§

impl From<MemorySemantics> for Operand

source§

fn from(o: MemorySemantics) -> Self

Converts to this type from the input type.
source§

impl From<Op> for Operand

source§

fn from(o: Op) -> Self

Converts to this type from the input type.
source§

impl From<RayFlags> for Operand

source§

fn from(o: RayFlags) -> Self

Converts to this type from the input type.
source§

impl From<RayQueryCandidateIntersectionType> for Operand

source§

fn from(o: RayQueryCandidateIntersectionType) -> Self

Converts to this type from the input type.
source§

impl From<RayQueryCommittedIntersectionType> for Operand

source§

fn from(o: RayQueryCommittedIntersectionType) -> Self

Converts to this type from the input type.
source§

impl From<RayQueryIntersection> for Operand

source§

fn from(o: RayQueryIntersection) -> Self

Converts to this type from the input type.
source§

impl From<SamplerAddressingMode> for Operand

source§

fn from(o: SamplerAddressingMode) -> Self

Converts to this type from the input type.
source§

impl From<SamplerFilterMode> for Operand

source§

fn from(o: SamplerFilterMode) -> Self

Converts to this type from the input type.
source§

impl From<Scope> for Operand

source§

fn from(o: Scope) -> Self

Converts to this type from the input type.
source§

impl From<SelectionControl> for Operand

source§

fn from(o: SelectionControl) -> Self

Converts to this type from the input type.
source§

impl From<SourceLanguage> for Operand

source§

fn from(o: SourceLanguage) -> Self

Converts to this type from the input type.
source§

impl From<StorageClass> for Operand

source§

fn from(o: StorageClass) -> Self

Converts to this type from the input type.
source§

impl From<String> for Operand

source§

fn from(o: String) -> Self

Converts to this type from the input type.
source§

impl From<f32> for Operand

source§

fn from(o: f32) -> Self

Converts to this type from the input type.
source§

impl From<f64> for Operand

source§

fn from(o: f64) -> Self

Converts to this type from the input type.
source§

impl From<u32> for Operand

source§

fn from(o: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for Operand

source§

fn from(o: u64) -> Self

Converts to this type from the input type.
source§

impl PartialEq<Operand> for Operand

source§

fn eq(&self, other: &Operand) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Operand

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.