[−][src]Struct tonic::transport::Endpoint
feature="transport"
only.Channel builder.
This struct is used to build and configure HTTP/2 channels.
Methods
impl Endpoint
[src]
pub fn from_static(s: &'static str) -> Self
[src]
feature="transport"
only.Convert an Endpoint
from a static string.
Endpoint::from_static("https://example.com");
pub fn from_shared(s: impl Into<Bytes>) -> Result<Self, InvalidUriBytes>
[src]
feature="transport"
only.Convert an Endpoint
from shared bytes.
Endpoint::from_shared("https://example.com".to_string());
ⓘImportant traits for &'_ mut Fpub fn timeout(&mut self, dur: Duration) -> &mut Self
[src]
feature="transport"
only.Apply a timeout to each request.
builder.timeout(Duration::from_secs(5));
ⓘImportant traits for &'_ mut Fpub fn concurrency_limit(&mut self, limit: usize) -> &mut Self
[src]
feature="transport"
only.Apply a concurrency limit to each request.
builder.concurrency_limit(256);
ⓘImportant traits for &'_ mut Fpub fn rate_limit(&mut self, limit: u64, duration: Duration) -> &mut Self
[src]
feature="transport"
only.Apply a rate limit to each request.
builder.rate_limit(32, Duration::from_secs(1));
ⓘImportant traits for &'_ mut Fpub fn initial_stream_window_size(
&mut self,
sz: impl Into<Option<u32>>
) -> &mut Self
[src]
&mut self,
sz: impl Into<Option<u32>>
) -> &mut Self
feature="transport"
only.Sets the SETTINGS_INITIAL_WINDOW_SIZE
option for HTTP2
stream-level flow control.
Default is 65,535
ⓘImportant traits for &'_ mut Fpub fn initial_connection_window_size(
&mut self,
sz: impl Into<Option<u32>>
) -> &mut Self
[src]
&mut self,
sz: impl Into<Option<u32>>
) -> &mut Self
feature="transport"
only.Sets the max connection-level flow control for HTTP2
Default is 65,535
ⓘImportant traits for &'_ mut Fpub fn intercept_headers<F>(&mut self, f: F) -> &mut Self where
F: Fn(&mut HeaderMap) + Send + Sync + 'static,
[src]
F: Fn(&mut HeaderMap) + Send + Sync + 'static,
feature="transport"
only.Intercept outbound HTTP Request headers;
ⓘImportant traits for &'_ mut Fpub fn tls_config(&mut self, tls_config: &ClientTlsConfig) -> &mut Self
[src]
feature="transport"
only.Configures TLS for the endpoint.
pub fn channel(&self) -> Channel
[src]
feature="transport"
only.Create a channel from this config.
Trait Implementations
impl From<Uri> for Endpoint
[src]
impl Clone for Endpoint
[src]
impl Debug for Endpoint
[src]
impl TryFrom<Bytes> for Endpoint
[src]
type Error = InvalidUriBytes
The type returned in the event of a conversion error.
fn try_from(t: Bytes) -> Result<Self, Self::Error>
[src]
impl TryFrom<String> for Endpoint
[src]
type Error = InvalidUriBytes
The type returned in the event of a conversion error.
fn try_from(t: String) -> Result<Self, Self::Error>
[src]
impl TryFrom<&'static str> for Endpoint
[src]
Auto Trait Implementations
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl !UnwindSafe for Endpoint
impl !RefUnwindSafe for Endpoint
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
ⓘImportant traits for &'_ mut Ffn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,