[−][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, InvalidUri>
[src]
feature="transport"
only.Convert an Endpoint
from shared bytes.
Endpoint::from_shared("https://example.com".to_string());
pub fn timeout(self, dur: Duration) -> Self
[src]
feature="transport"
only.Apply a timeout to each request.
builder.timeout(Duration::from_secs(5));
pub fn tcp_keepalive(self, tcp_keepalive: Option<Duration>) -> Self
[src]
feature="transport"
only.Set whether TCP keepalive messages are enabled on accepted connections.
If None
is specified, keepalive is disabled, otherwise the duration
specified will be the time to remain idle before sending TCP keepalive
probes.
Default is no keepalive (None
)
pub fn concurrency_limit(self, limit: usize) -> Self
[src]
feature="transport"
only.Apply a concurrency limit to each request.
builder.concurrency_limit(256);
pub fn rate_limit(self, limit: u64, duration: Duration) -> Self
[src]
feature="transport"
only.Apply a rate limit to each request.
builder.rate_limit(32, Duration::from_secs(1));
pub fn initial_stream_window_size(self, sz: impl Into<Option<u32>>) -> Self
[src]
feature="transport"
only.Sets the SETTINGS_INITIAL_WINDOW_SIZE
option for HTTP2
stream-level flow control.
Default is 65,535
pub fn initial_connection_window_size(self, sz: impl Into<Option<u32>>) -> Self
[src]
feature="transport"
only.Sets the max connection-level flow control for HTTP2
Default is 65,535
pub fn tls_config(self, tls_config: ClientTlsConfig) -> Self
[src]
feature="transport"
and feature="tls"
only.Configures TLS for the endpoint.
pub fn tcp_nodelay(self, enabled: bool) -> Self
[src]
feature="transport"
only.Set the value of TCP_NODELAY
option for accepted connections. Enabled by default.
pub async fn connect<'_>(&'_ self) -> Result<Channel, Error>
[src]
feature="transport"
only.Create a channel from this config.
pub async fn connect_with_connector<'_, C>(
&'_ self,
connector: C
) -> Result<Channel, Error> where
C: MakeConnection<Uri> + Send + 'static,
C::Connection: Unpin + Send + 'static,
C::Future: Send + 'static,
Box<dyn Error + Send + Sync>: From<C::Error> + Send + 'static,
[src]
&'_ self,
connector: C
) -> Result<Channel, Error> where
C: MakeConnection<Uri> + Send + 'static,
C::Connection: Unpin + Send + 'static,
C::Future: Send + 'static,
Box<dyn Error + Send + Sync>: From<C::Error> + Send + 'static,
feature="transport"
only.Connect with a custom connector.
Trait Implementations
impl Clone for Endpoint
[src]
impl Debug for Endpoint
[src]
impl From<Uri> for Endpoint
[src]
impl TryFrom<&'static str> for Endpoint
[src]
type Error = Never
The type returned in the event of a conversion error.
fn try_from(t: &'static str) -> Result<Self, Self::Error>
[src]
impl TryFrom<Bytes> for Endpoint
[src]
type Error = InvalidUri
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]
Auto Trait Implementations
impl !RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl !UnwindSafe for Endpoint
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T> Instrument for T
[src]
ⓘImportant traits for Instrumented<T>fn instrument(self, span: Span) -> Instrumented<Self>
[src]
ⓘImportant traits for Instrumented<T>fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
ⓘImportant traits for WithDispatch<T>fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,