pub struct LocalSession { /* private fields */ }Expand description
A struct for implementing perspective_client::Session against an
same-process Server instance.
See also perspective_client::ProxySession for implement the trait
against an arbitrary remote transport.
Trait Implementations§
Source§impl Debug for LocalSession
impl Debug for LocalSession
Source§impl Drop for LocalSession
impl Drop for LocalSession
Source§impl Session<Box<dyn Error + Send + Sync>> for LocalSession
impl Session<Box<dyn Error + Send + Sync>> for LocalSession
Source§async fn handle_request(&self, request: &[u8]) -> Result<(), ServerError>
async fn handle_request(&self, request: &[u8]) -> Result<(), ServerError>
Handle an incoming request from the
Client. Calling
Session::handle_request will result in the send_response parameter
which was used to construct this Session to fire one or more times. Read moreSource§async fn poll(&self) -> Result<(), ServerError>
async fn poll(&self) -> Result<(), ServerError>
Flush any pending messages which may have resulted from previous
Session::handle_request calls. Calling Session::poll may result
in the send_response parameter which was used to construct this (or
other) Session to fire. Whenever a Session::handle_request
method is invoked for a perspective_server::Server, at least one
Session::poll should be scheduled to clear other clients message
queues. Read moreAuto Trait Implementations§
impl Freeze for LocalSession
impl !RefUnwindSafe for LocalSession
impl Send for LocalSession
impl Sync for LocalSession
impl Unpin for LocalSession
impl !UnwindSafe for LocalSession
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more