[][src]Struct pixelflut_rs::server::Server

pub struct Server<G: Grid + Send + Sync> { /* fields omitted */ }

The Pixelflut Server.

The Server is defined by an interface and a port where it should listen on. It also requires a Grid on which the Pixels should be drawn on. To start everything you just need to do the following:

let server = Server::new("0.0.0.0".parse()?, 2342, grid);
server.start().await

Implementations

impl<G> Server<G> where
    G: 'static + Grid + Send + Sync
[src]

pub fn new(interface: IpAddr, port: u16, grid: G) -> Server<G>[src]

Creates a new Server for the given interface, port and Grid.

pub async fn start(self) -> Result<(), Box<dyn Error>>[src]

This method will start your server and will never return without an error.

Auto Trait Implementations

impl<G> !RefUnwindSafe for Server<G>[src]

impl<G> Send for Server<G>[src]

impl<G> Sync for Server<G>[src]

impl<G> Unpin for Server<G>[src]

impl<G> !UnwindSafe for Server<G>[src]

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.