pub struct Axum { /* private fields */ }Expand description
Axum-based HTTP server implementation
Implementations§
Source§impl Axum
impl Axum
pub fn new(addr: SocketAddr) -> Self
pub fn bind(addr: impl Into<SocketAddr>) -> Self
Trait Implementations§
Source§impl Server for Axum
impl Server for Axum
Source§fn run<'life0, 'async_trait, C, F>(
&'life0 self,
endpoints: Vec<Endpoint>,
collector: C,
on_ready: Option<F>,
) -> Pin<Box<dyn Future<Output = Result<C::Output, HarnessError>> + Send + 'async_trait>>where
C: Collector + 'static + 'async_trait,
F: FnOnce(SocketAddr) + Send + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait, C, F>(
&'life0 self,
endpoints: Vec<Endpoint>,
collector: C,
on_ready: Option<F>,
) -> Pin<Box<dyn Future<Output = Result<C::Output, HarnessError>> + Send + 'async_trait>>where
C: Collector + 'static + 'async_trait,
F: FnOnce(SocketAddr) + Send + 'static + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
Start the server with the given endpoints and collector. Read more
Auto Trait Implementations§
impl Freeze for Axum
impl RefUnwindSafe for Axum
impl Send for Axum
impl Sync for Axum
impl Unpin for Axum
impl UnwindSafe for Axum
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