pub struct ServerWiring { /* private fields */ }Expand description
Deployment wiring for a custom binary. serve_main is exactly
serve_with(ServerWiring::reference()); a deployment-owned binary substitutes
its own metering and hooks the runtime handles it needs.
Implementations§
Source§impl ServerWiring
impl ServerWiring
Sourcepub fn stock() -> Self
pub fn stock() -> Self
The stock open-engine server: no accounting, no admin listener, no capture.
Sourcepub fn with_metering(factory: MeteringFactory) -> Self
pub fn with_metering(factory: MeteringFactory) -> Self
A server whose admission/accounting is the factory’s. See
[MeteringWiring::Custom] for what this deliberately turns off.
Sourcepub fn claiming(self, var: &'static str) -> Self
pub fn claiming(self, var: &'static str) -> Self
Declare that the deployment consumes this reference-only env var itself
(e.g. its own admin listener reads MEMRA_ADMIN_ADDR), disarming the
custom-wiring startup FATAL for exactly that var.
pub fn on_ready( self, hook: impl FnOnce(RuntimeHandles) + Send + 'static, ) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for ServerWiring
impl !Sync for ServerWiring
impl !UnwindSafe for ServerWiring
impl Freeze for ServerWiring
impl Send for ServerWiring
impl Unpin for ServerWiring
impl UnsafeUnpin for ServerWiring
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more