#[repr(C)]pub struct Op { /* private fields */ }Expand description
An operator obtained through Op::get, not a fresh allocation.
Implementations§
Source§impl Op
impl Op
Sourcepub fn get(name: &str) -> Result<Self>
pub fn get(name: &str) -> Result<Self>
The registered operator name, a registry singleton (ir.GetOp).
Sourcepub fn has_attr_map(name: &str) -> Result<bool>
pub fn has_attr_map(name: &str) -> Result<bool>
Whether any operator registered the attribute name, as Op::HasAttrMap (ir.ListOpAttrNames).
Sourcepub fn attr_map<T: AnyCompatible>(name: &str) -> Result<Option<OpAttrMap<T>>>
pub fn attr_map<T: AnyCompatible>(name: &str) -> Result<Option<OpAttrMap<T>>>
The live attribute column name, as Op::GetAttrMap<T>, or None when no operator
registered it (ir.GetOpAttrColumn).
Sourcepub fn list_op_names() -> Result<Array<String>>
pub fn list_op_names() -> Result<Array<String>>
The names of the registered operators (ir.ListOpNames).
Sourcepub fn list_attr_names() -> Result<Array<String>>
pub fn list_attr_names() -> Result<Array<String>>
The names of the attributes any operator registered (ir.ListOpAttrNames).
Methods from Deref<Target = OpObj>§
Sourcepub fn attrs_type_index(&self) -> u32
pub fn attrs_type_index(&self) -> u32
Runtime type index corresponding to attrs_type_key (not reflected natively).
Sourcepub fn validator(&self) -> &Any
pub fn validator(&self) -> &Any
Process-local validation callback (not reflected natively): a native function address
held as an opaque pointer, a packed function, or None when there is none.
Sourcepub fn validator_is_custom(&self) -> bool
pub fn validator_is_custom(&self) -> bool
Whether the validator was explicitly registered rather than generated (not reflected natively).
Trait Implementations§
Source§impl AnyCompatible for Op
impl AnyCompatible for Op
Source§unsafe fn is_undefined(field: *const Self) -> bool
unsafe fn is_undefined(field: *const Self) -> bool
field, which holds a value of this type or all-zero bytes,
holds all-zero bytes that are no value of this type, as a null object
reference, a string of type index None or a zero device type: a field
that a creator left undefined for reflection to set, as C++ UnsafeInit
leaves a reference undefined (null). Unlike a C++ undefined reference,
it is no value; a nullable reference is Option<T>, whose None is a
defined value. Read moreSource§unsafe fn copy_to_any_view(src: &Self, data: &mut TVMFFIAny)
unsafe fn copy_to_any_view(src: &Self, data: &mut TVMFFIAny)
unsafe fn check_any_strict(data: &TVMFFIAny) -> bool
Source§unsafe fn copy_from_any_view_after_check(data: &TVMFFIAny) -> Self
unsafe fn copy_from_any_view_after_check(data: &TVMFFIAny) -> Self
Source§unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
unsafe fn move_to_any(src: Self, data: &mut TVMFFIAny)
Source§unsafe fn move_from_any_after_check(data: &mut TVMFFIAny) -> Self
unsafe fn move_from_any_after_check(data: &mut TVMFFIAny) -> Self
Source§unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
unsafe fn try_cast_from_any_view(data: &TVMFFIAny) -> Result<Self, ()>
Source§fn get_mismatch_type_info(data: &TVMFFIAny) -> String
fn get_mismatch_type_info(data: &TVMFFIAny) -> String
Source§fn type_schema() -> String
fn type_schema() -> String
TypeTraits<T>::TypeSchema writes, which the type schemas of functions
and fields embed. Read moreSource§impl<'a> ArgIntoRef for &'a Op
impl<'a> ArgIntoRef for &'a Op
Source§impl<'a> IntoArgHolder for &'a Op
impl<'a> IntoArgHolder for &'a Op
Source§impl IntoArgHolder for Op
impl IntoArgHolder for Op
Source§impl ObjectRefCore for Op
impl ObjectRefCore for Op
type ContainerType = <ObjectArc<OpObj> as Deref>::Target
fn data(this: &Self) -> &ObjectArc<Self::ContainerType>
fn into_data(this: Self) -> ObjectArc<Self::ContainerType>
Source§unsafe fn from_data(data: ObjectArc<Self::ContainerType>) -> Self
unsafe fn from_data(data: ObjectArc<Self::ContainerType>) -> Self
Source§fn same_as<Other>(&self, other: &Other) -> boolwhere
Other: ObjectRefCore,
fn same_as<Other>(&self, other: &Other) -> boolwhere
Other: ObjectRefCore,
Source§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectCore,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectCore,
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl !Send for Op
impl !Sync for Op
impl Unpin for Op
impl UnwindSafe for Op
Blanket Implementations§
Source§impl<T> ArgType for Twhere
T: ObjectRefCore + AnyCompatible + 'static,
impl<T> ArgType for Twhere
T: ObjectRefCore + AnyCompatible + 'static,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ObjectRefCast for Twhere
T: ObjectRefCore + AnyCompatible,
impl<T> ObjectRefCast for Twhere
T: ObjectRefCore + AnyCompatible,
Source§fn try_cast<B>(self) -> Result<B, Error>where
B: ObjectRefCore + AnyCompatible,
fn try_cast<B>(self) -> Result<B, Error>where
B: ObjectRefCore + AnyCompatible,
self and rewrap the underlying object as B without copying.