pub struct GrpcClientBuilder {
pub endpoint: Endpoint,
pub send_compressed: Option<CompressionEncoding>,
pub accept_compressed: Option<CompressionEncoding>,
pub max_decoding_message_size: Option<usize>,
pub max_encoding_message_size: Option<usize>,
pub interceptor: GrpcInterceptor,
}Fields§
§endpoint: Endpoint§send_compressed: Option<CompressionEncoding>§accept_compressed: Option<CompressionEncoding>§max_decoding_message_size: Option<usize>§max_encoding_message_size: Option<usize>§interceptor: GrpcInterceptorImplementations§
Source§impl GrpcClientBuilder
impl GrpcClientBuilder
pub fn from_static(endpoint: &'static str) -> Self
pub fn connect_timeout(self, dur: Duration) -> Self
pub fn buffer_size(self, sz: impl Into<Option<usize>>) -> Self
pub fn http2_adaptive_window(self, enabled: bool) -> Self
pub fn http2_keep_alive_interval(self, interval: Duration) -> Self
pub fn initial_connection_window_size(self, sz: impl Into<Option<u32>>) -> Self
pub fn initial_stream_window_size(self, sz: impl Into<Option<u32>>) -> Self
pub fn keep_alive_timeout(self, duration: Duration) -> Self
pub fn keep_alive_while_idle(self, enabled: bool) -> Self
pub fn tcp_keepalive(self, tcp_keepalive: Option<Duration>) -> Self
pub fn tcp_nodelay(self, enabled: bool) -> Self
pub fn timeout(self, dur: Duration) -> Self
pub fn tls_config( self, tls_config: ClientTlsConfig, ) -> Result<Self, GrpcClientBuilderError>
pub async fn tls_config_native_roots( self, ca_certificate: Option<&PathBuf>, ) -> Result<Self, GrpcClientBuilderError>
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn x_token<T>( self, x_token: Option<T>, ) -> Result<Self, InvalidMetadataValueBytes>
pub async fn connect(self) -> Result<GrpcClient<impl Interceptor>, Error>
pub fn connect_lazy(self) -> Result<GrpcClient<impl Interceptor>, Error>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GrpcClientBuilder
impl !RefUnwindSafe for GrpcClientBuilder
impl Send for GrpcClientBuilder
impl Sync for GrpcClientBuilder
impl Unpin for GrpcClientBuilder
impl UnsafeUnpin for GrpcClientBuilder
impl !UnwindSafe for GrpcClientBuilder
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
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