pub struct RpcContext {
pub session: Arc<Session>,
pub packet: Packet,
/* private fields */
}Expand description
Context information in the duration of a RPC
Fields§
§session: Arc<Session>§packet: PacketImplementations§
Source§impl RpcContext
impl RpcContext
pub fn into_stream(self: Arc<Self>) -> StreamSender
pub fn responsed(&self) -> bool
pub async fn response<C, R: MethodReturn<C>>(&self, res: R) -> Result<()>
pub fn response_sync<C, R: MethodReturn<C>>(&self, res: R)
pub async fn response_error(&self, err: impl ToString)
Auto Trait Implementations§
impl !Freeze for RpcContext
impl !RefUnwindSafe for RpcContext
impl Send for RpcContext
impl Sync for RpcContext
impl Unpin for RpcContext
impl !UnwindSafe for RpcContext
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