[−][src]Struct simple_socket::SocketServer
Implementations
impl<Req, Res> SocketServer<Req, Res> where
Req: DeserializeOwned,
Res: Serialize,
[src]
Req: DeserializeOwned,
Res: Serialize,
pub fn try_new(addr: SocketAddr, backlog: Backlog) -> Result<Self>
[src]
impl<Req, Res> SocketServer<Req, Res> where
Req: DeserializeOwned,
Res: Serialize,
[src]
Req: DeserializeOwned,
Res: Serialize,
pub fn run<H, P>(self, handler: H, post: P) -> Result<()> where
H: FnMut(Req) -> Res,
P: Fn(&mut Self) -> PostServing,
[src]
H: FnMut(Req) -> Res,
P: Fn(&mut Self) -> PostServing,
pub fn has_connections(&self) -> bool
[src]
pub fn num_connections(&self) -> usize
[src]
Auto Trait Implementations
impl<Req, Res> RefUnwindSafe for SocketServer<Req, Res> where
Req: RefUnwindSafe,
Res: RefUnwindSafe,
Req: RefUnwindSafe,
Res: RefUnwindSafe,
impl<Req, Res> Send for SocketServer<Req, Res> where
Req: Send,
Res: Send,
Req: Send,
Res: Send,
impl<Req, Res> Sync for SocketServer<Req, Res> where
Req: Sync,
Res: Sync,
Req: Sync,
Res: Sync,
impl<Req, Res> Unpin for SocketServer<Req, Res> where
Req: Unpin,
Res: Unpin,
Req: Unpin,
Res: Unpin,
impl<Req, Res> UnwindSafe for SocketServer<Req, Res> where
Req: UnwindSafe,
Res: UnwindSafe,
Req: UnwindSafe,
Res: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,