pub struct ServerBuilder { /* private fields */ }Expand description
Builder for a Server
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
Sourcepub fn listen_tcp(self, socket: SocketAddr) -> Self
pub fn listen_tcp(self, socket: SocketAddr) -> Self
Listens on the given TCP socket
Sourcepub fn listen_unix(self, path: PathBuf) -> Self
pub fn listen_unix(self, path: PathBuf) -> Self
Listens on the given Unix socket
Sourcepub fn with_metrics_registry(self, registry: &Registry) -> Self
pub fn with_metrics_registry(self, registry: &Registry) -> Self
Sets up metrics with provided Registry
Sourcepub fn with_metrics(self, metrics: Metrics) -> Self
pub fn with_metrics(self, metrics: Metrics) -> Self
Sets up metrics with provided Metrics.
Overrides with_metrics_registry().
Sourcepub fn with_rustls_config(self, rustls_cfg: ServerConfig) -> Self
pub fn with_rustls_config(self, rustls_cfg: ServerConfig) -> Self
Sets up TLS with provided ServerConfig
Sourcepub const fn with_options(self, options: ServerOptions) -> Self
pub const fn with_options(self, options: ServerOptions) -> Self
Sets up with provided Options
Auto Trait Implementations§
impl Freeze for ServerBuilder
impl !RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl !UnwindSafe for ServerBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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 moreSource§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>
Wrap the input message
T in a tonic::Request