pub struct ServerBuilder<A: TlsAcceptor = TlsAcceptor> {
pub http: ServerBuilder<A>,
/* private fields */
}Expand description
Builder for gRPC server.
Fields§
§http: ServerBuilder<A>HTTP/2 server builder.
Implementations§
Source§impl ServerBuilder<TlsAcceptor>
impl ServerBuilder<TlsAcceptor>
Sourcepub fn new_plain() -> ServerBuilder
pub fn new_plain() -> ServerBuilder
New builder for no-TLS HTTP/2.
Source§impl<A: TlsAcceptor> ServerBuilder<A>
impl<A: TlsAcceptor> ServerBuilder<A>
Sourcepub fn new() -> ServerBuilder<A>
pub fn new() -> ServerBuilder<A>
New builder for given TLS acceptor.
Sourcepub fn new_unix() -> ServerBuilder<A>
pub fn new_unix() -> ServerBuilder<A>
New builder for unix socket HTTP/2 server.
Sourcepub fn add_service(&mut self, def: ServerServiceDefinition)
pub fn add_service(&mut self, def: ServerServiceDefinition)
Register service for this server.
Service definition is typically in generated code.
Auto Trait Implementations§
impl<A> Freeze for ServerBuilder<A>
impl<A = TlsAcceptor> !RefUnwindSafe for ServerBuilder<A>
impl<A> Send for ServerBuilder<A>
impl<A> Sync for ServerBuilder<A>
impl<A> Unpin for ServerBuilder<A>
impl<A = TlsAcceptor> !UnwindSafe for ServerBuilder<A>
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