pub struct StreamSinkSynchronousProxy { /* private fields */ }
Implementations§
Source§impl StreamSinkSynchronousProxy
impl StreamSinkSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<StreamSinkEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<StreamSinkEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn send_packet(
&self,
packet: &StreamPacket,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn send_packet( &self, packet: &StreamPacket, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Sends a packet to the service. The response is sent when the service is done with the associated payload memory.
packet
must be valid for the current buffer set, otherwise the service
will close the connection.
Sourcepub fn send_packet_no_reply(&self, packet: &StreamPacket) -> Result<(), Error>
pub fn send_packet_no_reply(&self, packet: &StreamPacket) -> Result<(), Error>
Sends a packet to the service. This interface doesn’t define how the client knows when the sink is done with the associated payload memory. The inheriting interface must define that.
packet
must be valid for the current buffer set, otherwise the service
will close the connection.
Sourcepub fn end_of_stream(&self) -> Result<(), Error>
pub fn end_of_stream(&self) -> Result<(), Error>
Indicates the stream has ended. The precise semantics of this method are determined by the inheriting interface.
Sourcepub fn discard_all_packets(
&self,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn discard_all_packets( &self, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Discards packets previously sent via SendPacket
or SendPacketNoReply
and not yet released. The response is sent after all packets have been
released.
Sourcepub fn discard_all_packets_no_reply(&self) -> Result<(), Error>
pub fn discard_all_packets_no_reply(&self) -> Result<(), Error>
Discards packets previously sent via SendPacket
or SendPacketNoReply
and not yet released.
Trait Implementations§
Source§impl Debug for StreamSinkSynchronousProxy
impl Debug for StreamSinkSynchronousProxy
Source§impl SynchronousProxy for StreamSinkSynchronousProxy
impl SynchronousProxy for StreamSinkSynchronousProxy
Source§type Proxy = StreamSinkProxy
type Proxy = StreamSinkProxy
Source§type Protocol = StreamSinkMarker
type Protocol = StreamSinkMarker
Proxy
controls.