pub enum StreamSinkRequest {
SendPacket {
packet: StreamPacket,
responder: StreamSinkSendPacketResponder,
},
SendPacketNoReply {
packet: StreamPacket,
control_handle: StreamSinkControlHandle,
},
EndOfStream {
control_handle: StreamSinkControlHandle,
},
DiscardAllPackets {
responder: StreamSinkDiscardAllPacketsResponder,
},
DiscardAllPacketsNoReply {
control_handle: StreamSinkControlHandle,
},
}
Expand description
Consumes a stream of packets. This interface is typically inherited along
with StreamBufferSet
to enable the transport of elementary streams from
clients to services.
Variants§
SendPacket
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.
SendPacketNoReply
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.
EndOfStream
Indicates the stream has ended. The precise semantics of this method are determined by the inheriting interface.
Fields
control_handle: StreamSinkControlHandle
DiscardAllPackets
Discards packets previously sent via SendPacket
or SendPacketNoReply
and not yet released. The response is sent after all packets have been
released.
Fields
responder: StreamSinkDiscardAllPacketsResponder
DiscardAllPacketsNoReply
Discards packets previously sent via SendPacket
or SendPacketNoReply
and not yet released.
Fields
control_handle: StreamSinkControlHandle
Implementations§
Source§impl StreamSinkRequest
impl StreamSinkRequest
pub fn into_send_packet( self, ) -> Option<(StreamPacket, StreamSinkSendPacketResponder)>
pub fn into_send_packet_no_reply( self, ) -> Option<(StreamPacket, StreamSinkControlHandle)>
pub fn into_end_of_stream(self) -> Option<StreamSinkControlHandle>
pub fn into_discard_all_packets( self, ) -> Option<StreamSinkDiscardAllPacketsResponder>
pub fn into_discard_all_packets_no_reply( self, ) -> Option<StreamSinkControlHandle>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL