pub struct PacketStreamSinkSynchronousProxy { /* private fields */ }Implementations§
Source§impl PacketStreamSinkSynchronousProxy
impl PacketStreamSinkSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<PacketStreamSinkEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<PacketStreamSinkEvent, 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: PacketStreamSinkPutPacketRequest,
___deadline: MonotonicInstant,
) -> Result<PacketStreamSinkPutPacketResult, Error>
pub fn put_packet( &self, payload: PacketStreamSinkPutPacketRequest, ___deadline: MonotonicInstant, ) -> Result<PacketStreamSinkPutPacketResult, Error>
Submits a packet to be processed by the server.
The client may queue multiple packets by calling PutPacket repeatedly.
Packets are processed in the order they were submitted. This call
blocks until the payload is processed. When this call returns, the
buffer region is guaranteed to be available for reuse.
Returns ZX_ERR_BAD_STATE if the stream is not started or configured.
Returns ZX_ERR_CANCELED if FlushPackets was called.
Returns ZX_ERR_INVALID_ARGS if the packet is invalid. This includes:
- The payload is missing.
inline_datais used butsupported_buffer_typesdoes not includeINLINE.vmo_transferis used butsupported_buffer_typesdoes not includeCLIENT_OWNEDorDRIVER_OWNED.vmo_idis unrecognized, orvmo_offset+payload_sizeexceeds the VMO size.
Note: The server is not required to detect if a VMO region is currently in use by a previous pending packet. Clients are responsible for managing buffer usage.
Sourcepub fn flush_packets(
&self,
___deadline: MonotonicInstant,
) -> Result<PacketStreamSinkFlushPacketsResult, Error>
pub fn flush_packets( &self, ___deadline: MonotonicInstant, ) -> Result<PacketStreamSinkFlushPacketsResult, Error>
Flushes all packets currently pending without processing them. This call waits until all pending packets are completed or canceled.
Note: A packet may be partially processed (e.g. if it contains multiple audio frames, or if the data does not align with encoded frame boundaries) before it is canceled.
Trait Implementations§
Source§impl From<Channel> for PacketStreamSinkSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for PacketStreamSinkSynchronousProxy
Source§impl From<PacketStreamSinkSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<PacketStreamSinkSynchronousProxy> for NullableHandle
Source§fn from(value: PacketStreamSinkSynchronousProxy) -> Self
fn from(value: PacketStreamSinkSynchronousProxy) -> Self
Source§impl FromClient for PacketStreamSinkSynchronousProxy
Available on Fuchsia only.
impl FromClient for PacketStreamSinkSynchronousProxy
Source§type Protocol = PacketStreamSinkMarker
type Protocol = PacketStreamSinkMarker
Source§fn from_client(value: ClientEnd<PacketStreamSinkMarker>) -> Self
fn from_client(value: ClientEnd<PacketStreamSinkMarker>) -> Self
Source§impl SynchronousProxy for PacketStreamSinkSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for PacketStreamSinkSynchronousProxy
Source§type Proxy = PacketStreamSinkProxy
type Proxy = PacketStreamSinkProxy
Source§type Protocol = PacketStreamSinkMarker
type Protocol = PacketStreamSinkMarker
Proxy controls.