oa::OperationContract

Stable semantic contract for one operation before backend lowering. Generated operation registries own these descriptors. The builder-style const methods are public so generated code remains ordinary inspectable Rust rather than a private binary table.

StRust public API

Declaration

pub struct OperationContract { /* private fields */ }
Public Rust declaration.

Public Methods

pub const fn variadic_inputs(self, kind: OpValueKind, minimum: usize) -> Self
pub const fn variadic_outputs(self, kind: OpValueKind, minimum: usize) -> Self
pub const fn aligned_variadic_aliases(self) -> Self
pub const fn attributes(self, attributes: &'static [OpAttributeSpec]) -> Self
pub const fn with_differentiation(self, value: OpDifferentiation) -> Self
pub const fn with_shape_rule(self, value: OpShapeRule) -> Self
pub const fn with_dtype_rule(self, value: OpDTypeRule) -> Self
pub const fn with_lowering(self, value: OpLowering) -> Self
pub const fn effects(self, value: OpEffect) -> Self
pub const fn mutated_inputs(self, mask: u8) -> Self
pub const fn optional_inputs(self, mask: u8) -> Self
pub const fn alias(self, output: usize, input: u8) -> Self
pub const fn with_control_flow(self, value: OpControlFlow) -> Self
pub const fn name(self) -> &'static str
pub const fn hash(self) -> u64
pub const fn differentiation(self) -> OpDifferentiation
pub const fn shape_rule(self) -> OpShapeRule
pub const fn dtype_rule(self) -> OpDTypeRule
pub const fn attribute_specs(self) -> &'static [OpAttributeSpec]
pub const fn lowering(self) -> OpLowering
pub const fn control_flow(self) -> OpControlFlow
fn clone(&self) -> OperationContract
fn fmt(&self, f: &mut Formatter<'_>) -> Result

Associated Functions

pub const fn new( name: &'static str, hash: u64, input_kinds: &'static [OpValueKind], output_kinds: &'static [OpValueKind], ) -> Self

Public Method Documentation

pub const fn variadic_inputs( self, kind: OpValueKind, minimum: usize ) -> Self
No public source comment is attached to this declaration.
pub const fn variadic_outputs( self, kind: OpValueKind, minimum: usize ) -> Self
No public source comment is attached to this declaration.
pub const fn aligned_variadic_aliases( self ) -> Self
No public source comment is attached to this declaration.
pub const fn attributes( self, attributes: &'static [OpAttributeSpec] ) -> Self
No public source comment is attached to this declaration.
pub const fn with_differentiation( self, value: OpDifferentiation ) -> Self
No public source comment is attached to this declaration.
pub const fn with_shape_rule( self, value: OpShapeRule ) -> Self
No public source comment is attached to this declaration.
pub const fn with_dtype_rule( self, value: OpDTypeRule ) -> Self
No public source comment is attached to this declaration.
pub const fn with_lowering( self, value: OpLowering ) -> Self
No public source comment is attached to this declaration.
pub const fn effects( self, value: OpEffect ) -> Self
No public source comment is attached to this declaration.
pub const fn mutated_inputs( self, mask: u8 ) -> Self
No public source comment is attached to this declaration.
pub const fn optional_inputs( self, mask: u8 ) -> Self
No public source comment is attached to this declaration.
pub const fn alias( self, output: usize, input: u8 ) -> Self
No public source comment is attached to this declaration.
pub const fn with_control_flow( self, value: OpControlFlow ) -> Self
No public source comment is attached to this declaration.
pub const fn name( self ) -> &'static str
No public source comment is attached to this declaration.
pub const fn hash( self ) -> u64
No public source comment is attached to this declaration.
pub const fn differentiation( self ) -> OpDifferentiation
No public source comment is attached to this declaration.
pub const fn shape_rule( self ) -> OpShapeRule
No public source comment is attached to this declaration.
pub const fn dtype_rule( self ) -> OpDTypeRule
No public source comment is attached to this declaration.
pub const fn attribute_specs( self ) -> &'static [OpAttributeSpec]
No public source comment is attached to this declaration.
pub const fn lowering( self ) -> OpLowering
No public source comment is attached to this declaration.
pub const fn control_flow( self ) -> OpControlFlow
No public source comment is attached to this declaration.
fn clone( &self ) -> OperationContract
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
pub const fn new( name: &'static str, hash: u64, input_kinds: &'static [OpValueKind], output_kinds: &'static [OpValueKind] ) -> Self
No public source comment is attached to this declaration.