Struct epic_api::ApiServer [−][src]
pub struct ApiServer { /* fields omitted */ }
Expand description
HTTP server allowing the registration of ApiEndpoint implementations.
Implementations
Creates a new ApiServer that will serve ApiEndpoint implementations under the root URL.
pub 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 !UnwindSafe for ApiServer
Blanket Implementations
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,
pub fn borrow_replacement(ptr: &T) -> &T
pub 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
type Output = T
type Output = T
Should always be Self