pub struct BlobWriterProxy { /* private fields */ }
Implementations§
Source§impl BlobWriterProxy
impl BlobWriterProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.fxfs/BlobWriter.
Sourcepub fn take_event_stream(&self) -> BlobWriterEventStream
pub fn take_event_stream(&self) -> BlobWriterEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_vmo(
&self,
size: u64,
) -> QueryResponseFut<BlobWriterGetVmoResult, DefaultFuchsiaResourceDialect>
pub fn get_vmo( &self, size: u64, ) -> QueryResponseFut<BlobWriterGetVmoResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<BlobWriterBytesReadyResult, DefaultFuchsiaResourceDialect>
pub fn bytes_ready( &self, bytes_written: u64, ) -> QueryResponseFut<BlobWriterBytesReadyResult, DefaultFuchsiaResourceDialect>
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 BlobWriterProxyInterface for BlobWriterProxy
impl BlobWriterProxyInterface for BlobWriterProxy
type GetVmoResponseFut = QueryResponseFut<Result<Vmo, i32>>
type BytesReadyResponseFut = QueryResponseFut<Result<(), i32>>
fn get_vmo(&self, size: u64) -> Self::GetVmoResponseFut
fn bytes_ready(&self, bytes_written: u64) -> Self::BytesReadyResponseFut
Source§impl Clone for BlobWriterProxy
impl Clone for BlobWriterProxy
Source§fn clone(&self) -> BlobWriterProxy
fn clone(&self) -> BlobWriterProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BlobWriterProxy
impl Debug for BlobWriterProxy
Source§impl Proxy for BlobWriterProxy
impl Proxy for BlobWriterProxy
Source§type Protocol = BlobWriterMarker
type Protocol = BlobWriterMarker
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
Auto Trait Implementations§
impl Freeze for BlobWriterProxy
impl !RefUnwindSafe for BlobWriterProxy
impl Send for BlobWriterProxy
impl Sync for BlobWriterProxy
impl Unpin for BlobWriterProxy
impl !UnwindSafe for BlobWriterProxy
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
)