pub struct PreparedNativeModule { /* private fields */ }Expand description
One freshly prepared Module Instance generation returned by an Execution Adapter.
Implementations§
Source§impl PreparedNativeModule
impl PreparedNativeModule
Sourcepub fn new(
endpoints: Vec<Rc<dyn NativeRequestEndpoint>>,
lifecycle: impl ModuleLifecycle,
) -> Self
pub fn new( endpoints: Vec<Rc<dyn NativeRequestEndpoint>>, lifecycle: impl ModuleLifecycle, ) -> Self
Creates one generation from its exact endpoint set and lifecycle Interface.
Sourcepub fn with_lifecycle(
endpoints: Vec<Rc<dyn NativeRequestEndpoint>>,
lifecycle: Rc<dyn ModuleLifecycle>,
) -> Self
pub fn with_lifecycle( endpoints: Vec<Rc<dyn NativeRequestEndpoint>>, lifecycle: Rc<dyn ModuleLifecycle>, ) -> Self
Creates one generation from an already shared lifecycle implementation.
Sourcepub fn with_endpoints(
endpoints: Vec<Rc<dyn NativeRequestEndpoint>>,
stream_endpoints: Vec<Rc<dyn NativeStreamEndpoint>>,
lifecycle: impl ModuleLifecycle,
) -> Self
pub fn with_endpoints( endpoints: Vec<Rc<dyn NativeRequestEndpoint>>, stream_endpoints: Vec<Rc<dyn NativeStreamEndpoint>>, lifecycle: impl ModuleLifecycle, ) -> Self
Creates one generation with request and bidirectional stream endpoints.
Sourcepub fn with_endpoint_set_lifecycle(
endpoints: NativeEndpointSet,
lifecycle: Rc<dyn ModuleLifecycle>,
) -> Self
pub fn with_endpoint_set_lifecycle( endpoints: NativeEndpointSet, lifecycle: Rc<dyn ModuleLifecycle>, ) -> Self
Creates a generation from one complete endpoint set and shared lifecycle.
Sourcepub fn with_stream_endpoints(
stream_endpoints: Vec<Rc<dyn NativeStreamEndpoint>>,
lifecycle: impl ModuleLifecycle,
) -> Self
pub fn with_stream_endpoints( stream_endpoints: Vec<Rc<dyn NativeStreamEndpoint>>, lifecycle: impl ModuleLifecycle, ) -> Self
Creates one generation containing only bidirectional stream endpoints.
Sourcepub fn with_event_endpoints(
event_endpoints: Vec<Rc<dyn NativeEventEndpoint>>,
lifecycle: impl ModuleLifecycle,
) -> Self
pub fn with_event_endpoints( event_endpoints: Vec<Rc<dyn NativeEventEndpoint>>, lifecycle: impl ModuleLifecycle, ) -> Self
Creates one generation containing only ephemeral Event endpoints.
Sourcepub fn with_all_endpoints(
endpoints: Vec<Rc<dyn NativeRequestEndpoint>>,
stream_endpoints: Vec<Rc<dyn NativeStreamEndpoint>>,
event_endpoints: Vec<Rc<dyn NativeEventEndpoint>>,
lifecycle: impl ModuleLifecycle,
) -> Self
pub fn with_all_endpoints( endpoints: Vec<Rc<dyn NativeRequestEndpoint>>, stream_endpoints: Vec<Rc<dyn NativeStreamEndpoint>>, event_endpoints: Vec<Rc<dyn NativeEventEndpoint>>, lifecycle: impl ModuleLifecycle, ) -> Self
Creates one generation with request, stream, and ephemeral Event endpoints.
Sourcepub fn endpoints(&self) -> &[Rc<dyn NativeRequestEndpoint>]
pub fn endpoints(&self) -> &[Rc<dyn NativeRequestEndpoint>]
Returns the exact endpoints prepared for this generation.
Sourcepub fn stream_endpoints(&self) -> &[Rc<dyn NativeStreamEndpoint>]
pub fn stream_endpoints(&self) -> &[Rc<dyn NativeStreamEndpoint>]
Returns the exact stream endpoints prepared for this generation.
Sourcepub fn event_endpoints(&self) -> &[Rc<dyn NativeEventEndpoint>]
pub fn event_endpoints(&self) -> &[Rc<dyn NativeEventEndpoint>]
Returns the exact Event endpoints prepared for this generation.
Sourcepub fn lifecycle(&self) -> Rc<dyn ModuleLifecycle>
pub fn lifecycle(&self) -> Rc<dyn ModuleLifecycle>
Returns the lifecycle Interface prepared for this generation.