pub struct Server { /* private fields */ }Expand description
Handler for communication to and from the front-end
Implementations§
Source§impl WebsocketServer
impl WebsocketServer
Sourcepub fn registry(&mut self) -> &mut ServiceRegistry<'static>
pub fn registry(&mut self) -> &mut ServiceRegistry<'static>
Get the service registry that the server handles
Sourcepub fn register<S: ServerService<'static> + Send + 'static>(
self,
service: S,
) -> Self
pub fn register<S: ServerService<'static> + Send + 'static>( self, service: S, ) -> Self
Register a nRPC service for this server to handle
Sourcepub fn run_blocking(self) -> Result<()>
pub fn run_blocking(self) -> Result<()>
Run the server forever, blocking the current thread
Auto Trait Implementations§
impl Freeze for WebsocketServer
impl !RefUnwindSafe for WebsocketServer
impl Send for WebsocketServer
impl Sync for WebsocketServer
impl Unpin for WebsocketServer
impl !UnwindSafe for WebsocketServer
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> 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