pub struct NativeModuleInstance { /* private fields */ }Expand description
Endpoints created for one statically linked Module Instance generation.
Implementations§
Source§impl NativeModuleInstance
impl NativeModuleInstance
Sourcepub fn new(endpoints: Vec<Rc<dyn NativeRequestEndpoint>>) -> Self
pub fn new(endpoints: Vec<Rc<dyn NativeRequestEndpoint>>) -> Self
Creates a generation from its exact declared endpoint set.
Sourcepub fn with_lifecycle(
endpoints: Vec<Rc<dyn NativeRequestEndpoint>>,
lifecycle: impl ModuleLifecycle,
) -> Self
pub fn with_lifecycle( endpoints: Vec<Rc<dyn NativeRequestEndpoint>>, lifecycle: impl ModuleLifecycle, ) -> Self
Creates a generation with its exact endpoints and lifecycle Interface.
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 a generation with request and bidirectional stream endpoints.
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 a 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 a 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 a generation with request, stream, and ephemeral Event endpoints.
Sourcepub fn lifecycle(&self) -> Rc<dyn ModuleLifecycle>
pub fn lifecycle(&self) -> Rc<dyn ModuleLifecycle>
Returns the lifecycle Interface for this generation.
Sourcepub fn endpoints(&self) -> &[Rc<dyn NativeRequestEndpoint>]
pub fn endpoints(&self) -> &[Rc<dyn NativeRequestEndpoint>]
Returns the exact endpoint set created for this generation.
Sourcepub fn stream_endpoints(&self) -> &[Rc<dyn NativeStreamEndpoint>]
pub fn stream_endpoints(&self) -> &[Rc<dyn NativeStreamEndpoint>]
Returns the exact bidirectional stream endpoint set created for this generation.
Sourcepub fn event_endpoints(&self) -> &[Rc<dyn NativeEventEndpoint>]
pub fn event_endpoints(&self) -> &[Rc<dyn NativeEventEndpoint>]
Returns the exact ephemeral Event endpoint set created for this Instance.
Trait Implementations§
Source§impl Debug for NativeModuleInstance
impl Debug for NativeModuleInstance
Auto Trait Implementations§
impl !RefUnwindSafe for NativeModuleInstance
impl !Send for NativeModuleInstance
impl !Sync for NativeModuleInstance
impl !UnwindSafe for NativeModuleInstance
impl Freeze for NativeModuleInstance
impl Unpin for NativeModuleInstance
impl UnsafeUnpin for NativeModuleInstance
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