[][src]Struct grpcio::StreamingCallSink

#[must_use = "if unused the StreamingCallSink may immediately cancel the RPC"]pub struct StreamingCallSink<Req> { /* fields omitted */ }

A sink for client streaming call and duplex streaming call. To close the sink properly, you should call close before dropping.

Implementations

impl<Req> StreamingCallSink<Req>[src]

pub fn enhance_batch(&mut self, flag: bool)[src]

By default it always sends messages with their configured buffer hint. But when the enhance_batch is enabled, messages will be batched together as many as possible. The rules are listed as below:

  • All messages except the last one will be sent with buffer_hint set to true.
  • The last message will also be sent with buffer_hint set to true unless any message is offered with buffer hint set to false.

No matter enhance_batch is true or false, it's recommended to follow the contract of Sink and call poll_flush to ensure messages are handled by gRPC C Core.

pub fn cancel(&mut self)[src]

Trait Implementations

impl<P> Drop for StreamingCallSink<P>[src]

pub fn drop(&mut self)[src]

The corresponding RPC will be canceled if the sink did not call close before dropping.

impl<Req> Sink<(Req, WriteFlags)> for StreamingCallSink<Req>[src]

type Error = Error

The type of value produced by the sink when an error occurs.

Auto Trait Implementations

impl<Req> !RefUnwindSafe for StreamingCallSink<Req>[src]

impl<Req> Send for StreamingCallSink<Req>[src]

impl<Req> Sync for StreamingCallSink<Req>[src]

impl<Req> Unpin for StreamingCallSink<Req>[src]

impl<Req> !UnwindSafe for StreamingCallSink<Req>[src]

Blanket Implementations

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

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

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

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

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

impl<T, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized
[src]

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.