pub struct BlobWriterSynchronousProxy { /* private fields */ }
Implementations§
Source§impl BlobWriterSynchronousProxy
impl BlobWriterSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<BlobWriterEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<BlobWriterEvent, 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 get_vmo(
&self,
size: u64,
___deadline: MonotonicInstant,
) -> Result<BlobWriterGetVmoResult, Error>
pub fn get_vmo( &self, size: u64, ___deadline: MonotonicInstant, ) -> Result<BlobWriterGetVmoResult, Error>
Truncates the blob associated with this BlobWriter proxy to length size
. Returns a handle
to a vmo
shared between the server and the client, which is implemented as a ring buffer.
As the client writes blob contents into the vmo
, it will call BytesReady to signal to the
server that some number of bytes have been written.
Ring Buffer Semantics The server sets the size of the vmo passed back to the client. The chunks that the client writes are arbitrarily sized and do not have any alignment guarantees. Any particular write can wrap around the ring buffer. The client can have several outstanding BytesReady requests but the client is responsible for not overwriting a given range in the ring buffer until the BytesReady request corresponding to that range has completed.
Sourcepub fn bytes_ready(
&self,
bytes_written: u64,
___deadline: MonotonicInstant,
) -> Result<BlobWriterBytesReadyResult, Error>
pub fn bytes_ready( &self, bytes_written: u64, ___deadline: MonotonicInstant, ) -> Result<BlobWriterBytesReadyResult, Error>
Indicates to the server that an additional bytes_written
number of bytes have been
written to the shared vmo and are ready to be read off the vmo and written to disk. The
blob will be readable when the final BytesReady response is received by the client.
Trait Implementations§
Source§impl Debug for BlobWriterSynchronousProxy
impl Debug for BlobWriterSynchronousProxy
Source§impl SynchronousProxy for BlobWriterSynchronousProxy
impl SynchronousProxy for BlobWriterSynchronousProxy
Source§type Proxy = BlobWriterProxy
type Proxy = BlobWriterProxy
Source§type Protocol = BlobWriterMarker
type Protocol = BlobWriterMarker
Proxy
controls.