pub struct Server<T: Transport> { /* private fields */ }
Expand description
A server for an endpoint.
Implementations§
Source§impl<T: Transport> Server<T>
impl<T: Transport> Server<T>
Sourcepub fn sender(&self) -> &ServerSender<T>
pub fn sender(&self) -> &ServerSender<T>
Returns the sender for the server.
Sourcepub async fn run<H>(
&mut self,
handler: H,
) -> Result<(), ProtocolError<T::Error>>where
H: ServerHandler<T>,
pub async fn run<H>(
&mut self,
handler: H,
) -> Result<(), ProtocolError<T::Error>>where
H: ServerHandler<T>,
Runs the server with the provided handler.
Auto Trait Implementations§
impl<T> Freeze for Server<T>
impl<T> RefUnwindSafe for Server<T>
impl<T> Send for Server<T>
impl<T> Sync for Server<T>
impl<T> Unpin for Server<T>
impl<T> UnwindSafe for Server<T>
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