pub struct SimpleStreamSinkProxy { /* private fields */ }
Implementations§
Source§impl SimpleStreamSinkProxy
impl SimpleStreamSinkProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.media/SimpleStreamSink.
Sourcepub fn take_event_stream(&self) -> SimpleStreamSinkEventStream
pub fn take_event_stream(&self) -> SimpleStreamSinkEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn add_payload_buffer(
&self,
id: u32,
payload_buffer: Vmo,
) -> Result<(), Error>
pub fn add_payload_buffer( &self, id: u32, payload_buffer: Vmo, ) -> Result<(), Error>
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.
Sourcepub fn remove_payload_buffer(&self, id: u32) -> Result<(), Error>
pub fn remove_payload_buffer(&self, id: u32) -> Result<(), Error>
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.
Sourcepub fn send_packet(
&self,
packet: &StreamPacket,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn send_packet( &self, packet: &StreamPacket, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn discard_all_packets( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
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 Clone for SimpleStreamSinkProxy
impl Clone for SimpleStreamSinkProxy
Source§fn clone(&self) -> SimpleStreamSinkProxy
fn clone(&self) -> SimpleStreamSinkProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SimpleStreamSinkProxy
impl Debug for SimpleStreamSinkProxy
Source§impl Proxy for SimpleStreamSinkProxy
impl Proxy for SimpleStreamSinkProxy
Source§type Protocol = SimpleStreamSinkMarker
type Protocol = SimpleStreamSinkMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§impl SimpleStreamSinkProxyInterface for SimpleStreamSinkProxy
impl SimpleStreamSinkProxyInterface for SimpleStreamSinkProxy
type SendPacketResponseFut = QueryResponseFut<()>
type DiscardAllPacketsResponseFut = QueryResponseFut<()>
fn add_payload_buffer(&self, id: u32, payload_buffer: Vmo) -> Result<(), Error>
fn remove_payload_buffer(&self, id: u32) -> Result<(), Error>
fn send_packet(&self, packet: &StreamPacket) -> Self::SendPacketResponseFut
fn send_packet_no_reply(&self, packet: &StreamPacket) -> Result<(), Error>
fn end_of_stream(&self) -> Result<(), Error>
fn discard_all_packets(&self) -> Self::DiscardAllPacketsResponseFut
fn discard_all_packets_no_reply(&self) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for SimpleStreamSinkProxy
impl !RefUnwindSafe for SimpleStreamSinkProxy
impl Send for SimpleStreamSinkProxy
impl Sync for SimpleStreamSinkProxy
impl Unpin for SimpleStreamSinkProxy
impl !UnwindSafe for SimpleStreamSinkProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)