pub struct Server { /* private fields */ }
Expand description
The http server
Implementations
sourceimpl Server
impl Server
sourcepub fn spawn(&self, executor: TaskExecutor) -> Result<ServerSpawn, ServerError>
pub fn spawn(&self, executor: TaskExecutor) -> Result<ServerSpawn, ServerError>
Spawn the server inside the provided executor and return a ServerSpawn context to explicitly terminate it.
sourcepub fn run(&self) -> Result<(), ServerError>
pub fn run(&self) -> Result<(), ServerError>
This method will run until the server terminates.
Auto Trait Implementations
impl !RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl !UnwindSafe for Server
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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