pub struct Server<T>(pub Arc<Mutex<InnerServer<T>>>);Tuple Fields§
§0: Arc<Mutex<InnerServer<T>>>Implementations§
Source§impl<T: KnetTransform + Send + Debug + Sync + Clone + 'static> Server<T>
impl<T: KnetTransform + Send + Debug + Sync + Clone + 'static> Server<T>
Sourcepub async fn run(
addr: impl ToSocketAddrs + Sync + Send,
) -> Result<(Self, UnboundedReceiver<Event<T>>), Box<dyn Error + Send + Sync>>
pub async fn run( addr: impl ToSocketAddrs + Sync + Send, ) -> Result<(Self, UnboundedReceiver<Event<T>>), Box<dyn Error + Send + Sync>>
Run the server on the addr adress and return and the server and Receiver
Auto Trait Implementations§
impl<T> Freeze for Server<T>
impl<T> !RefUnwindSafe for Server<T>
impl<T> Send for Server<T>where
T: Send,
impl<T> Sync for Server<T>where
T: Send,
impl<T> Unpin for Server<T>
impl<T> UnsafeUnpin 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