pub struct PayloadStreamSynchronousProxy { /* private fields */ }
Implementations§
source§impl PayloadStreamSynchronousProxy
impl PayloadStreamSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(&self, deadline: Time) -> Result<PayloadStreamEvent, Error>
pub fn wait_for_event(&self, deadline: Time) -> Result<PayloadStreamEvent, 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 register_vmo(&self, vmo: Vmo, ___deadline: Time) -> Result<i32, Error>
pub fn register_vmo(&self, vmo: Vmo, ___deadline: Time) -> Result<i32, Error>
Registers a VMO to stream into.
This can be called once per PayloadStream. Any subsequent calls will return ZX_ERR_ALREADY_BOUND.
sourcepub fn read_data(&self, ___deadline: Time) -> Result<ReadResult, Error>
pub fn read_data(&self, ___deadline: Time) -> Result<ReadResult, Error>
Reads data into the pre-registered vmo.