pub struct AsyncSession { /* private fields */ }Expand description
One incoming async call: like Session but self-contained — the
payload is copied out of host memory so the future may outlive the
ABI callback that created it.
Implementations§
Source§impl AsyncSession
impl AsyncSession
Sourcepub fn entry_id(&self) -> u32
pub fn entry_id(&self) -> u32
The entry’s dispatch id (its index in the combined
Plugin::ENTRIES + Plugin::ASYNC_ENTRIES list).
Sourcepub fn into_payload(self) -> Vec<u8> ⓘ
pub fn into_payload(self) -> Vec<u8> ⓘ
Takes the payload without copying it again.
Sourcepub fn send_frame(&self, data: Vec<u8>) -> NrStatus
pub fn send_frame(&self, data: Vec<u8>) -> NrStatus
Sends one stream data frame; safe from any thread.
Sourcepub fn end_stream(&self, data: Vec<u8>) -> NrStatus
pub fn end_stream(&self, data: Vec<u8>) -> NrStatus
Ends a stream with a final frame.
Auto Trait Implementations§
impl Freeze for AsyncSession
impl RefUnwindSafe for AsyncSession
impl Send for AsyncSession
impl Sync for AsyncSession
impl Unpin for AsyncSession
impl UnsafeUnpin for AsyncSession
impl UnwindSafe for AsyncSession
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