pub enum SimpleStreamSinkRequest {
AddPayloadBuffer {
id: u32,
payload_buffer: Vmo,
control_handle: SimpleStreamSinkControlHandle,
},
RemovePayloadBuffer {
id: u32,
control_handle: SimpleStreamSinkControlHandle,
},
SendPacket {
packet: StreamPacket,
responder: SimpleStreamSinkSendPacketResponder,
},
SendPacketNoReply {
packet: StreamPacket,
control_handle: SimpleStreamSinkControlHandle,
},
EndOfStream {
control_handle: SimpleStreamSinkControlHandle,
},
DiscardAllPackets {
responder: SimpleStreamSinkDiscardAllPacketsResponder,
},
DiscardAllPacketsNoReply {
control_handle: SimpleStreamSinkControlHandle,
},
}
Expand description
A StreamSink that uses StreamBufferSet for buffer management.
Variants§
AddPayloadBuffer
Adds a payload buffer to the current buffer set associated with the
connection. A StreamPacket
struct reference a payload buffer in the
current set by ID using the StreamPacket.payload_buffer_id
field.
A buffer with ID id
must not be in the current set when this method is
invoked, otherwise the service will close the connection.
RemovePayloadBuffer
Removes a payload buffer from the current buffer set associated with the connection.
A buffer with ID id
must exist in the current set when this method is
invoked, otherwise the service will will close the connection.
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: SimpleStreamSinkControlHandle
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: SimpleStreamSinkDiscardAllPacketsResponder
DiscardAllPacketsNoReply
Discards packets previously sent via SendPacket
or SendPacketNoReply
and not yet released.
Fields
control_handle: SimpleStreamSinkControlHandle
Implementations§
Source§impl SimpleStreamSinkRequest
impl SimpleStreamSinkRequest
pub fn into_add_payload_buffer( self, ) -> Option<(u32, Vmo, SimpleStreamSinkControlHandle)>
pub fn into_remove_payload_buffer( self, ) -> Option<(u32, SimpleStreamSinkControlHandle)>
pub fn into_send_packet( self, ) -> Option<(StreamPacket, SimpleStreamSinkSendPacketResponder)>
pub fn into_send_packet_no_reply( self, ) -> Option<(StreamPacket, SimpleStreamSinkControlHandle)>
pub fn into_end_of_stream(self) -> Option<SimpleStreamSinkControlHandle>
pub fn into_discard_all_packets( self, ) -> Option<SimpleStreamSinkDiscardAllPacketsResponder>
pub fn into_discard_all_packets_no_reply( self, ) -> Option<SimpleStreamSinkControlHandle>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL