pub struct Session<'a> { /* private fields */ }Expand description
One incoming call: the entry it targets, its payload, and the session id for manual (streaming) replies.
Implementations§
Source§impl Session<'_>
impl Session<'_>
Sourcepub fn entry_id(&self) -> u32
pub fn entry_id(&self) -> u32
The entry’s dispatch id (its index in Plugin::ENTRIES).
Sourcepub fn send_frame(&mut self, data: Vec<u8>) -> NrStatus
pub fn send_frame(&mut self, data: Vec<u8>) -> NrStatus
Sends one stream data frame; finish with Session::end_stream
and return Reply::None from the handler.
Sourcepub fn end_stream(&mut self, data: Vec<u8>) -> NrStatus
pub fn end_stream(&mut self, data: Vec<u8>) -> NrStatus
Ends a stream with a final frame.
Auto Trait Implementations§
impl<'a> Freeze for Session<'a>
impl<'a> RefUnwindSafe for Session<'a>
impl<'a> Send for Session<'a>
impl<'a> Sync for Session<'a>
impl<'a> Unpin for Session<'a>
impl<'a> UnsafeUnpin for Session<'a>
impl<'a> UnwindSafe for Session<'a>
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