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 put_packet(
&self,
payload: StreamSinkPutPacketRequest,
) -> Result<(), Error>
pub fn put_packet( &self, payload: StreamSinkPutPacketRequest, ) -> Result<(), Error>
Puts a packet to the sink.
Sourcepub fn start_segment(
&self,
payload: &StreamSinkStartSegmentRequest,
) -> Result<(), Error>
pub fn start_segment( &self, payload: &StreamSinkStartSegmentRequest, ) -> Result<(), Error>
Starts a new segment. Packets following this request and preceding the next such request are assigned to the segment.
Sourcepub fn end(&self) -> Result<(), Error>
pub fn end(&self) -> Result<(), Error>
Indicates that the end of the stream has been reached. Consumers such as audio renderers
signal their clients when the last packet before end-of-stream has been rendered, so the
client knows when to, for example, change the UI state of a player to let the user know the
content is done playing. This method is logically scoped to the current segment. A
SetSegment
request and (typically) more packets may follow this request.
Sourcepub fn will_close(
&self,
payload: &StreamSinkWillCloseRequest,
) -> Result<(), Error>
pub fn will_close( &self, payload: &StreamSinkWillCloseRequest, ) -> Result<(), Error>
Sent immediately before the producer closes to indicate why the producer is closing the connection. After sending this request, the producer must refrain from sending any more messages and close the connection promptly.
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.