Skip to main content

GrpcRequestBuilder

Struct GrpcRequestBuilder 

Source
pub struct GrpcRequestBuilder { /* private fields */ }

Implementations§

Source§

impl GrpcRequestBuilder

Source

pub fn metadata( self, name: impl AsRef<str>, value: impl AsRef<str>, ) -> Result<Self>

Source

pub fn metadata_map<I, K, V>(self, values: I) -> Result<Self>
where I: IntoIterator<Item = (K, V)>, K: AsRef<str>, V: AsRef<str>,

Source

pub fn metadata_bin( self, name: impl AsRef<str>, value: impl AsRef<[u8]>, ) -> Result<Self>

Source

pub fn message<T: Serialize>(self, value: &T) -> Result<Self>

Source

pub fn messages<S, T>(self, stream: S) -> Result<Self>
where S: Stream<Item = Result<T>> + Send + 'static, T: Serialize + Send,

Source

pub fn message_bytes(self, value: impl Into<Bytes>) -> Result<Self>

Source

pub fn messages_bytes<S, B>(self, stream: S) -> Result<Self>
where S: Stream<Item = Result<B>> + Send + 'static, B: Into<Bytes> + Send + 'static,

Source

pub fn codec(self, codec: GrpcCodec) -> Self

Source

pub fn compression(self, algo: impl AsRef<str>) -> Self

Source

pub fn protocol_policy(self, policy: ProtocolPolicy) -> Self

Source

pub fn prefer_http3(self) -> Self

Source

pub fn prefer_http2(self) -> Self

Source

pub fn http2_only(self) -> Self

Source

pub fn http3_only(self) -> Self

Source

pub fn prior_knowledge_h2c(self, enabled: bool) -> Self

Source

pub fn timeout(self, duration: Duration) -> Self

Source

pub fn connect_timeout(self, duration: Duration) -> Self

Source

pub fn read_timeout(self, duration: Duration) -> Self

Source

pub fn write_timeout(self, duration: Duration) -> Self

Source

pub fn tls_config(self, tls_config: TlsConfig) -> Self

Source

pub fn danger_accept_invalid_certs(self, enabled: bool) -> Self

Source

pub fn tls_backend(self, backend: TlsBackend) -> Self

Source

pub async fn send_streaming(self) -> Result<GrpcStreamingResponse>

Source

pub async fn open_duplex(self) -> Result<GrpcDuplexCall>

Trait Implementations§

Source§

impl IntoFuture for GrpcRequestBuilder

Source§

type Output = Result<GrpcResponse, Error>

The output that the future will produce on completion.
Source§

type IntoFuture = Pin<Box<dyn Future<Output = <GrpcRequestBuilder as IntoFuture>::Output> + Send>>

Which kind of future are we turning this into?
Source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.