Struct spaceapi_server::SpaceapiServer
source · pub struct SpaceapiServer { /* private fields */ }
Expand description
A SpaceAPI server instance.
You can create a new instance using the new
constructor method by
passing it the host, the port, the Status
object and a redis connection info object.
The SpaceapiServer
includes a web server through
Hyper. Simply call the serve
method.
Implementations§
source§impl SpaceapiServer
impl SpaceapiServer
sourcepub fn serve<S: ToSocketAddrs>(self, socket_addr: S) -> HttpResult<Listening>
pub fn serve<S: ToSocketAddrs>(self, socket_addr: S) -> HttpResult<Listening>
Start a HTTP server listening on self.host:self.port
.
The call returns an HttpResult<Listening>
object, see
http://ironframework.io/doc/hyper/server/struct.Listening.html
for more information.
Auto Trait Implementations§
impl !RefUnwindSafe for SpaceapiServer
impl Send for SpaceapiServer
impl Sync for SpaceapiServer
impl Unpin for SpaceapiServer
impl !UnwindSafe for SpaceapiServer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> PersistentInto<Arc<Mutex<T>, Global>> for T
impl<T> PersistentInto<Arc<Mutex<T>, Global>> for T
§fn persistent_into(self) -> Arc<Mutex<T>, Global>
fn persistent_into(self) -> Arc<Mutex<T>, Global>
Convert
self
into a value of type T
.§impl<T> PersistentInto<Arc<RwLock<T>, Global>> for T
impl<T> PersistentInto<Arc<RwLock<T>, Global>> for T
§fn persistent_into(self) -> Arc<RwLock<T>, Global>
fn persistent_into(self) -> Arc<RwLock<T>, Global>
Convert
self
into a value of type T
.§impl<T> PersistentInto<Arc<T, Global>> for T
impl<T> PersistentInto<Arc<T, Global>> for T
§fn persistent_into(self) -> Arc<T, Global>
fn persistent_into(self) -> Arc<T, Global>
Convert
self
into a value of type T
.§impl<T> PersistentInto<T> for T
impl<T> PersistentInto<T> for T
§fn persistent_into(self) -> T
fn persistent_into(self) -> T
Convert
self
into a value of type T
.