pub struct PluginEntry { /* private fields */ }Expand description
A pre-resolved plugin entry point that dispatches by integer id
: the per-call entry-name comparison and NrStr construction
are paid once, in PluginHandle::entry, instead of on every call.
Implementations§
Source§impl PluginEntry
impl PluginEntry
Sourcepub async fn call(&self, payload: &[u8]) -> Result<NrStatus>
pub async fn call(&self, payload: &[u8]) -> Result<NrStatus>
Fire-and-forget call; see PluginHandle::call.
Sourcepub async fn call_response(&self, payload: &[u8]) -> Result<(NrStatus, Vec<u8>)>
pub async fn call_response(&self, payload: &[u8]) -> Result<(NrStatus, Vec<u8>)>
Request-response call; see PluginHandle::call_response.
Sourcepub async fn call_response_fast(
&self,
payload: &[u8],
) -> Result<(NrStatus, Vec<u8>)>
pub async fn call_response_fast( &self, payload: &[u8], ) -> Result<(NrStatus, Vec<u8>)>
Synchronous fast-path call; see PluginHandle::call_response_fast.
Sourcepub async fn call_stream(&self, payload: &[u8]) -> Result<(u64, StreamReceiver)>
pub async fn call_stream(&self, payload: &[u8]) -> Result<(u64, StreamReceiver)>
Streaming call; see PluginHandle::call_stream.
Trait Implementations§
Source§impl Clone for PluginEntry
impl Clone for PluginEntry
Source§fn clone(&self) -> PluginEntry
fn clone(&self) -> PluginEntry
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 !RefUnwindSafe for PluginEntry
impl !UnwindSafe for PluginEntry
impl Freeze for PluginEntry
impl Send for PluginEntry
impl Sync for PluginEntry
impl Unpin for PluginEntry
impl UnsafeUnpin for PluginEntry
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