[−][src]Struct webthing::server::WebThingServer
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]
things: ThingsType,
port: Option<u16>,
hostname: Option<String>,
ssl_options: Option<(String, String)>,
action_generator: Box<dyn ActionGenerator>,
base_path: Option<String>
) -> Self
Create a new WebThingServer.
Arguments
things
- list of Things managed by this servername
- name of this device -- this is only needed if the server is managing multiple thingsport
- port to listen on (defaults to 80)hostname
- optional host name, i.e. mything.comssl_options
- tuple of SSL options to pass to the actix web serveraction_generator
- action generator structbase_path
- base URL to use, rather than '/'
pub fn start(
&mut self,
configure: Option<Arc<dyn Fn(&mut ServiceConfig) + Send + Sync + 'static>>
) -> Server
[src]
&mut self,
configure: Option<Arc<dyn Fn(&mut ServiceConfig) + Send + Sync + 'static>>
) -> Server
Start listening for incoming connections.
Auto Trait Implementations
impl !RefUnwindSafe for WebThingServer
impl Send for WebThingServer
impl Sync for WebThingServer
impl Unpin for WebThingServer
impl !UnwindSafe for WebThingServer
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T> GetTypeId for T where
T: Any,
[src]
T: Any,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,