[][src]Struct nickel::ListeningServer

pub struct ListeningServer(_);

A server listeing on a socket

Methods

impl ListeningServer
[src]

pub fn socket(&self) -> SocketAddr
[src]

Gets the SocketAddr which the server is currently listening on.

pub fn detach(self)
[src]

Detaches the server thread.

This doesn't actually kill the server, it just stops the current thread from blocking due to the server running. In the case where main returns due to this unblocking, then the server will be killed due to process death.

The required use of this is when writing unit tests which spawn servers and do not want to block the test-runner by waiting on the server to stop because it probably never will.

See this hyper issue for more information.

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

impl<T> UnsafeAny for T where
    T: Any