pub struct AdminServer { /* private fields */ }Expand description
The admin server, bound and ready to run.
Implementations§
Source§impl AdminServer
impl AdminServer
Sourcepub async fn bind(
addr: SocketAddr,
render: Arc<dyn Fn() -> String + Sync + Send>,
health: Arc<HealthState>,
) -> Result<AdminServer, Error>
pub async fn bind( addr: SocketAddr, render: Arc<dyn Fn() -> String + Sync + Send>, health: Arc<HealthState>, ) -> Result<AdminServer, Error>
Bind the admin socket. Use port 0 to let the OS choose (tests).
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
The bound address (relevant with port 0).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AdminServer
impl !RefUnwindSafe for AdminServer
impl Send for AdminServer
impl Sync for AdminServer
impl Unpin for AdminServer
impl UnsafeUnpin for AdminServer
impl !UnwindSafe for AdminServer
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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