pub struct HybridModuleSpec {
pub name: String,
pub trait_name: String,
pub binding: HybridBinding,
pub implementation: HybridImpl,
pub emit_wire: bool,
pub stateless: bool,
pub surface_scoped: bool,
pub methods: Vec<HybridMethodSpec>,
pub events: Vec<HybridEventSpec>,
pub doc: Option<String>,
pub explicit_interface_id: Option<InterfaceId>,
pub c_name: Option<String>,
}Expand description
Nitro-style native module declared with #[nv_hybrid_module(name = "...")].
Fields§
§name: String§trait_name: String§binding: HybridBinding§implementation: HybridImpl§emit_wire: bool§stateless: bool§surface_scoped: bool§methods: Vec<HybridMethodSpec>§events: Vec<HybridEventSpec>§doc: Option<String>§explicit_interface_id: Option<InterfaceId>Optional explicit fixed interface ID override (e.g. interface_id = 1 for core engine
interfaces NV_IFACE_SURFACE..NV_IFACE_DEV). When None, defaults to deterministic
XXH64 ID >= 0x1000_0000.
c_name: Option<String>Optional explicit C vtable struct name (e.g. "NvSurfaceApi", binding = "vtable" only).
Implementations§
Source§impl HybridModuleSpec
impl HybridModuleSpec
Sourcepub fn interface_id(&self) -> InterfaceId
pub fn interface_id(&self) -> InterfaceId
Interface ID: returns explicit_interface_id when set, otherwise a deterministic ID
in the reserved hybrid range (>= 0x1000_0000).
Sourcepub fn has_batchable(&self) -> bool
pub fn has_batchable(&self) -> bool
True iff at least one method on this module is #[batchable].
Sourcepub fn has_batch_replies(&self) -> bool
pub fn has_batch_replies(&self) -> bool
True iff at least one #[batchable] method on this module returns a non-void value.
Sourcepub fn schema_hash(&self, file: &HybridFileSpec) -> u64
pub fn schema_hash(&self, file: &HybridFileSpec) -> u64
Deterministic XXH64 schema hash covering this module’s binding, implementation, methods, events, and all transitively referenced structs and enums.
Trait Implementations§
Source§impl Clone for HybridModuleSpec
impl Clone for HybridModuleSpec
Source§fn clone(&self) -> HybridModuleSpec
fn clone(&self) -> HybridModuleSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more