pub struct Server { /* private fields */ }Expand description
A bound server which can be run in the current task or spawned.
Implementations§
Source§impl Server
impl Server
pub async fn bind( config: ServerConfig, recording_path: impl AsRef<Path>, ) -> Result<Self, ServerError>
pub fn local_addr(&self) -> SocketAddr
Sourcepub fn live_diagnostics(&self) -> LiveDiagnostics
pub fn live_diagnostics(&self) -> LiveDiagnostics
Returns counters for verifying and observing the shared live tailer.
pub async fn serve(self) -> Result<(), ServerError>
pub fn spawn(self) -> ServerHandle
Sourcepub fn router(
config: ServerConfig,
recording_path: impl AsRef<Path>,
) -> Result<Router, ServerError>
pub fn router( config: ServerConfig, recording_path: impl AsRef<Path>, ) -> Result<Router, ServerError>
Builds a router for embedding and in-process tests without binding a socket.
Sourcepub fn router_with_diagnostics(
config: ServerConfig,
recording_path: impl AsRef<Path>,
) -> Result<(Router, LiveDiagnostics), ServerError>
pub fn router_with_diagnostics( config: ServerConfig, recording_path: impl AsRef<Path>, ) -> Result<(Router, LiveDiagnostics), ServerError>
Builds an embeddable router together with shared live-tailer diagnostics.
Auto Trait Implementations§
impl !Freeze for Server
impl !RefUnwindSafe for Server
impl !UnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin for Server
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