[][src]Struct tonic::transport::channel::Channel

pub struct Channel { /* fields omitted */ }
This is supported on feature="transport" only.

A default batteries included transport channel.

This provides a fully featured http2 gRPC client based on hyper::Client and tower services.

Methods

impl Channel[src]

pub fn builder(uri: Uri) -> Endpoint[src]

This is supported on feature="transport" only.

Create a Endpoint builder that can create a Channel's.

pub fn from_static(s: &'static str) -> Endpoint[src]

This is supported on feature="transport" only.

Create an Endpoint from a static string.

Channel::from_static("https://example.com");

pub fn from_shared(s: impl Into<Bytes>) -> Result<Endpoint, InvalidUriBytes>[src]

This is supported on feature="transport" only.

Create an Endpoint from shared bytes.

Channel::from_shared("https://example.com");

pub fn balance_list(list: impl Iterator<Item = Endpoint>) -> Self[src]

This is supported on feature="transport" only.

Balance a list of Endpoint's.

This creates a Channel that will load balance accross all the provided endpoints.

Trait Implementations

impl GrpcService<BoxBody> for Channel[src]

type ResponseBody = Body

Responses body given by the service.

type Error = Error

Errors produced by the service.

type Future = ResponseFuture

The future response value.

impl Clone for Channel[src]

impl Debug for Channel[src]

Auto Trait Implementations

impl Send for Channel

impl Sync for Channel

impl Unpin for Channel

impl !UnwindSafe for Channel

impl !RefUnwindSafe for Channel

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]