[][src]Struct simple_socket::SocketServer

pub struct SocketServer<Req, Res> where
    Req: DeserializeOwned,
    Res: Serialize
{ /* fields omitted */ }

Implementations

impl<Req, Res> SocketServer<Req, Res> where
    Req: DeserializeOwned,
    Res: Serialize
[src]

pub fn try_new(addr: SocketAddr, backlog: Backlog) -> Result<Self>[src]

impl<Req, Res> SocketServer<Req, Res> where
    Req: DeserializeOwned,
    Res: Serialize
[src]

pub fn run<H, P>(self, handler: H, post: P) -> Result<()> where
    H: FnMut(Req) -> Res,
    P: Fn(&mut Self) -> PostServing
[src]

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

impl<Req, Res> Send for SocketServer<Req, Res> where
    Req: Send,
    Res: Send

impl<Req, Res> Sync for SocketServer<Req, Res> where
    Req: Sync,
    Res: Sync

impl<Req, Res> Unpin for SocketServer<Req, Res> where
    Req: Unpin,
    Res: Unpin

impl<Req, Res> UnwindSafe for SocketServer<Req, Res> where
    Req: UnwindSafe,
    Res: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.