[−][src]Struct pixelflut_rs::server::Server
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:
ⓘThis example deliberately fails to compile
let server = Server::new("0.0.0.0".parse()?, 2342, grid); server.start().await
Implementations
impl<G> Server<G> where
G: 'static + Grid + Send,
[src]
G: 'static + Grid + Send,
pub fn new(interface: IpAddr, port: u16, grid: G) -> Server<G>
[src]
Creates a new Server which with 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>
impl<G> Send for Server<G>
impl<G> Sync for Server<G>
impl<G> Unpin for Server<G>
impl<G> UnwindSafe for Server<G>
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,
pub 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.
pub 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>,