[][src]Struct webthing::server::WebThingServer

pub struct WebThingServer { /* fields omitted */ }

Server to represent a Web Thing over HTTP.

Implementations

impl WebThingServer[src]

pub fn new(
    things: ThingsType,
    port: Option<u16>,
    hostname: Option<String>,
    ssl_options: Option<(String, String)>,
    action_generator: Box<dyn ActionGenerator>,
    base_path: Option<String>
) -> Self
[src]

Create a new WebThingServer.

Arguments

  • things - list of Things managed by this server
  • name - name of this device -- this is only needed if the server is managing multiple things
  • port - port to listen on (defaults to 80)
  • hostname - optional host name, i.e. mything.com
  • ssl_options - tuple of SSL options to pass to the actix web server
  • action_generator - action generator struct
  • base_path - base URL to use, rather than '/'

pub fn start(
    &mut self,
    configure: Option<Arc<dyn Fn(&mut ServiceConfig) + Send + Sync + 'static>>
) -> Server
[src]

Start listening for incoming connections.

Auto Trait Implementations

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> Erased for T

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

impl<T> GetTypeId for T where
    T: Any
[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,