pub struct NativePluginInstance { /* private fields */ }Expand description
Endpoints created for one statically linked Plugin Instance generation.
Implementations§
Source§impl NativePluginInstance
impl NativePluginInstance
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 PluginLifecycle,
) -> Self
pub fn with_lifecycle( endpoints: Vec<Rc<dyn NativeRequestEndpoint>>, lifecycle: impl PluginLifecycle, ) -> 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 PluginLifecycle,
) -> Self
pub fn with_endpoints( endpoints: Vec<Rc<dyn NativeRequestEndpoint>>, stream_endpoints: Vec<Rc<dyn NativeStreamEndpoint>>, lifecycle: impl PluginLifecycle, ) -> Self
Creates a generation with request and bidirectional stream endpoints.
Sourcepub fn with_stream_endpoints(
stream_endpoints: Vec<Rc<dyn NativeStreamEndpoint>>,
lifecycle: impl PluginLifecycle,
) -> Self
pub fn with_stream_endpoints( stream_endpoints: Vec<Rc<dyn NativeStreamEndpoint>>, lifecycle: impl PluginLifecycle, ) -> Self
Creates a generation containing only bidirectional stream endpoints.
Sourcepub fn with_event_endpoints(
event_endpoints: Vec<Rc<dyn NativeEventEndpoint>>,
lifecycle: impl PluginLifecycle,
) -> Self
pub fn with_event_endpoints( event_endpoints: Vec<Rc<dyn NativeEventEndpoint>>, lifecycle: impl PluginLifecycle, ) -> 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 PluginLifecycle,
) -> 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 PluginLifecycle, ) -> Self
Creates a generation with request, stream, and ephemeral Event endpoints.
Sourcepub fn lifecycle(&self) -> Rc<dyn PluginLifecycle>
pub fn lifecycle(&self) -> Rc<dyn PluginLifecycle>
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 NativePluginInstance
impl Debug for NativePluginInstance
Auto Trait Implementations§
impl !RefUnwindSafe for NativePluginInstance
impl !Send for NativePluginInstance
impl !Sync for NativePluginInstance
impl !UnwindSafe for NativePluginInstance
impl Freeze for NativePluginInstance
impl Unpin for NativePluginInstance
impl UnsafeUnpin for NativePluginInstance
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