Struct grpcio::ServerStreamingSink [−][src]
A sink for server streaming call.
To close the sink properly, you should call close
or fail
before dropping.
Implementations
impl<T> ServerStreamingSink<T>
[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 set_status(&mut self, status: RpcStatus)
[src]
pub fn fail(self, status: RpcStatus) -> ServerStreamingSinkFailureⓘNotable traits for ServerStreamingSinkFailure
impl Future for ServerStreamingSinkFailure type Output = Result<()>;
[src]
Notable traits for ServerStreamingSinkFailure
impl Future for ServerStreamingSinkFailure type Output = Result<()>;
Trait Implementations
impl<T> Drop for ServerStreamingSink<T>
[src][+]
impl<T> Sink<(T, WriteFlags)> for ServerStreamingSink<T>
[src][+]
Auto Trait Implementations
impl<T> !RefUnwindSafe for ServerStreamingSink<T>
impl<T> Send for ServerStreamingSink<T>
impl<T> !Sync for ServerStreamingSink<T>
impl<T> Unpin for ServerStreamingSink<T>
impl<T> !UnwindSafe for ServerStreamingSink<T>
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,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, Item> SinkExt<Item> for T where
T: Sink<Item> + ?Sized,
[src][+]
T: Sink<Item> + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,