pub struct DirectBatchSpec<'a> {
pub module: &'a HybridModuleSpec,
pub methods: Vec<DirectBatchMethodSpec<'a>>,
pub has_replies: bool,
pub err_kind: DirectErrKind,
}Expand description
Complete lowered batch contract for a binding = "direct" module with >= 1 #[batchable] method.
Fields§
§module: &'a HybridModuleSpec§methods: Vec<DirectBatchMethodSpec<'a>>§has_replies: boolTrue iff at least one batchable method returns a non-void Ok payload.
err_kind: DirectErrKindUnified error channel (ModStatus, CustomEnum(name), or String; all-infallible
impl = "rust" modules normalize to ModStatus).
Implementations§
Source§impl<'a> DirectBatchSpec<'a>
impl<'a> DirectBatchSpec<'a>
Sourcepub fn from_module(
m: &'a HybridModuleSpec,
spec: &HybridFileSpec,
) -> Option<DirectBatchSpec<'a>>
pub fn from_module( m: &'a HybridModuleSpec, spec: &HybridFileSpec, ) -> Option<DirectBatchSpec<'a>>
Returns Some(DirectBatchSpec) iff m has at least one #[batchable] method.
Sourcepub fn uses_err_sink(&self) -> bool
pub fn uses_err_sink(&self) -> bool
True iff the C-ABI submit_batch signature carries (on_err: NvBytesSink, err_ctx: void*).
Sourcepub fn any_borrowed_param(&self) -> bool
pub fn any_borrowed_param(&self) -> bool
True iff any batchable method takes a borrowed String or Bytes parameter.
Trait Implementations§
Source§impl<'a> Clone for DirectBatchSpec<'a>
impl<'a> Clone for DirectBatchSpec<'a>
Source§fn clone(&self) -> DirectBatchSpec<'a>
fn clone(&self) -> DirectBatchSpec<'a>
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 moreAuto Trait Implementations§
impl<'a> Forget for DirectBatchSpec<'a>
impl<'a> Freeze for DirectBatchSpec<'a>where
&'a HybridModuleSpec: Freeze,
*const u8 is !null: Freeze,
PhantomData<DirectBatchMethodSpec<'a>>: Freeze,
PhantomData<u8>: Freeze,
impl<'a> Move for DirectBatchSpec<'a>
impl<'a> RefUnwindSafe for DirectBatchSpec<'a>
impl<'a> Send for DirectBatchSpec<'a>where
&'a HybridModuleSpec: Send,
RawVecInner: Send,
&'a HybridMethodSpec: Send,
BoxRaw<HybridType>: Send,
&'a HybridType: Send,
impl<'a> Sync for DirectBatchSpec<'a>
impl<'a> Unpin for DirectBatchSpec<'a>where
&'a HybridModuleSpec: Unpin,
*const u8 is !null: Unpin,
&'a HybridMethodSpec: Unpin,
Box<HybridType>: Unpin,
&'a HybridType: Unpin,
impl<'a> UnsafeUnpin for DirectBatchSpec<'a>where
&'a HybridModuleSpec: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<DirectBatchMethodSpec<'a>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl<'a> UnwindSafe for DirectBatchSpec<'a>where
&'a HybridModuleSpec: UnwindSafe,
RawVecInner: UnwindSafe,
&'a HybridMethodSpec: UnwindSafe,
BoxRaw<HybridType>: UnwindSafe,
&'a HybridType: UnwindSafe,
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