pub struct HybridMethodSpec {
pub name: String,
pub params: Vec<HybridParamSpec>,
pub return_type: HybridType,
pub doc: Option<String>,
pub has_self: bool,
pub optional: bool,
pub is_async: bool,
pub batchable: bool,
}Expand description
Method declared on a HybridModuleSpec, imperative #[method] on a HybridViewSpec, or C API function.
Fields§
§name: String§params: Vec<HybridParamSpec>§return_type: HybridType§doc: Option<String>§has_self: boolWhether the trait method takes a self receiver (true for instance methods, false for static/create fns).
optional: boolWhether this vtable or host-ops slot may be NULL (#[optional]).
is_async: boolWhether this method is declared async fn (direct binding only; callback-based C ABI).
batchable: boolWhether this method is opted into #[batchable] command-buffer codegen (direct sync only).
Implementations§
Source§impl HybridMethodSpec
impl HybridMethodSpec
Sourcepub fn ok_type(&self) -> &HybridType
pub fn ok_type(&self) -> &HybridType
Returns the underlying success payload type (unwrapping Result<ok, _> when fallible).
Trait Implementations§
Source§impl Clone for HybridMethodSpec
impl Clone for HybridMethodSpec
Source§fn clone(&self) -> HybridMethodSpec
fn clone(&self) -> HybridMethodSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HybridMethodSpec
impl Debug for HybridMethodSpec
impl Eq for HybridMethodSpec
Source§impl PartialEq for HybridMethodSpec
impl PartialEq for HybridMethodSpec
impl StructuralPartialEq for HybridMethodSpec
Auto Trait Implementations§
impl Forget for HybridMethodSpec
impl Freeze for HybridMethodSpecwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<HybridParamSpec>: Freeze,
*const HybridType is !null: Freeze,
PhantomData<HybridType>: Freeze,
impl Move for HybridMethodSpec
impl RefUnwindSafe for HybridMethodSpec
impl Send for HybridMethodSpec
impl Sync for HybridMethodSpec
impl Unpin for HybridMethodSpec
impl UnsafeUnpin for HybridMethodSpecwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<HybridParamSpec>: UnsafeUnpin,
*const HybridType is !null: UnsafeUnpin,
PhantomData<HybridType>: UnsafeUnpin,
impl UnwindSafe for HybridMethodSpec
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