Struct stack_test_epic_api::ApiServer
source · [−]pub struct ApiServer { /* private fields */ }
Expand description
HTTP server allowing the registration of ApiEndpoint implementations.
Implementations
sourceimpl ApiServer
impl ApiServer
sourcepub fn new() -> ApiServer
pub fn new() -> ApiServer
Creates a new ApiServer that will serve ApiEndpoint implementations under the root URL.
sourcepub fn start(
&mut self,
addr: SocketAddr,
router: Router,
conf: Option<TLSConfig>
) -> Result<JoinHandle<()>, Error>
pub fn start(
&mut self,
addr: SocketAddr,
router: Router,
conf: Option<TLSConfig>
) -> Result<JoinHandle<()>, Error>
Starts ApiServer at the provided address. TODO support stop operation
Auto Trait Implementations
impl !RefUnwindSafe for ApiServer
impl Send for ApiServer
impl Sync for ApiServer
impl Unpin for ApiServer
impl !UnwindSafe for ApiServer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> SafeBorrow<T> for T where
T: ?Sized,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
fn borrow_replacement(ptr: &T) -> &T
Given ptr
, which was obtained from a prior call to Self::borrow()
,
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self
. Read more