pub struct OpObj {
pub index: u32,
pub name: String,
pub doc: String,
pub args_info: Array<ArgumentInfo>,
pub ty_args_info: Array<ArgumentInfo>,
pub var_args_info: Option<ArgumentInfo>,
pub var_ty_args_info: Option<ArgumentInfo>,
pub attrs_type_key: String,
/* private fields */
}Expand description
The object of an operator registry entry (ir.Op).
Only the registry constructs one: get an operator with Op::get.
Fields§
§index: u32The dense, process-local index of the operator into the attribute columns; never serialized.
name: StringThe canonical name of the operator, such as "prim.exp".
doc: StringThe documentation of the operator.
args_info: Array<ArgumentInfo>The descriptions of the required value arguments, in order.
ty_args_info: Array<ArgumentInfo>The descriptions of the required type arguments, in order.
var_args_info: Option<ArgumentInfo>The description of the variadic value tail after args_info, if any.
var_ty_args_info: Option<ArgumentInfo>The description of the variadic type-argument tail after
ty_args_info, if any.
attrs_type_key: StringThe type key of the operator’s Call.attrs, or empty when it declares none.
Implementations§
Source§impl OpObj
impl OpObj
Sourcepub fn attrs_type_index(&self) -> u32
pub fn attrs_type_index(&self) -> u32
Return the runtime type index of attrs_type_key, or 0 when the
operator declares no attrs type.
Sourcepub fn validator(&self) -> &Any
pub fn validator(&self) -> &Any
Return the validator that Call::validate runs: a native
function pointer, a packed function, or None.
Sourcepub fn validator_is_custom(&self) -> bool
pub fn validator_is_custom(&self) -> bool
Return whether the validator was set with
OpDef::set_validator rather than generated from a
signature.