Struct console_subscriber::ServerParts
source · #[non_exhaustive]pub struct ServerParts {
pub instrument_server: InstrumentServer<Server>,
pub aggregator: Aggregator,
}
Expand description
Server Parts
This struct contains the parts returned by Server::into_parts
. It may contain
further parts in the future, an as such is marked as non_exhaustive
.
The InstrumentServer<Server>
can be used to construct a router which
can be added to a tonic
gRPC server.
The aggregator
is a future which should be running as long as the server is.
Generally, this future should be spawned onto an appropriate runtime and then
aborted if the server gets shut down.
See the Server::into_parts
documentation for usage.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.instrument_server: InstrumentServer<Server>
The instrument server.
See the documentation for InstrumentServer
for details.
aggregator: Aggregator
The aggregator.
Responsible for collecting and preparing traces for the instrument server to send its clients.
The aggregator should be run
when the instrument server is started.
If the server stops running for any reason, the aggregator task can be
aborted.
Auto Trait Implementations§
impl Freeze for ServerParts
impl !RefUnwindSafe for ServerParts
impl Send for ServerParts
impl Sync for ServerParts
impl Unpin for ServerParts
impl !UnwindSafe for ServerParts
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request