pub struct BlobCreatorProxy { /* private fields */ }Implementations§
Source§impl BlobCreatorProxy
impl BlobCreatorProxy
Sourcepub fn take_event_stream(&self) -> BlobCreatorEventStream
pub fn take_event_stream(&self) -> BlobCreatorEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn create(
&self,
hash: &[u8; 32],
allow_existing: bool,
) -> QueryResponseFut<BlobCreatorCreateResult, DefaultFuchsiaResourceDialect>
pub fn create( &self, hash: &[u8; 32], allow_existing: bool, ) -> QueryResponseFut<BlobCreatorCreateResult, DefaultFuchsiaResourceDialect>
Creates a blob with the merkle root hash. If allow_existing is true, the server will
overwrite the existing blob if there is one. The server may fail this request with
[CreateBlobError.ALREADY_EXISTS] if there is already an inflight BlobWriter for the same
hash which has not been closed or completed. The client will truncate the blob with
[BlobWriter.GetVmo] and get a handle to a vmo in return. The client will then write blob
contents into the vmo and call [BlobWriter.BytesReady] on the ’writer` to signal to the
server that some number of bytes has been written to the vmo.
Sourcepub fn needs_overwrite(
&self,
blob_hash: &[u8; 32],
) -> QueryResponseFut<BlobCreatorNeedsOverwriteResult, DefaultFuchsiaResourceDialect>
pub fn needs_overwrite( &self, blob_hash: &[u8; 32], ) -> QueryResponseFut<BlobCreatorNeedsOverwriteResult, DefaultFuchsiaResourceDialect>
Given the hash of a blob, returns true if it should be overwritten using Create with
allow_existing set to true.
Trait Implementations§
Source§impl BlobCreatorProxyInterface for BlobCreatorProxy
impl BlobCreatorProxyInterface for BlobCreatorProxy
type CreateResponseFut = QueryResponseFut<Result<ClientEnd<BlobWriterMarker>, CreateBlobError>>
type NeedsOverwriteResponseFut = QueryResponseFut<Result<bool, i32>>
fn create( &self, hash: &[u8; 32], allow_existing: bool, ) -> Self::CreateResponseFut
fn needs_overwrite( &self, blob_hash: &[u8; 32], ) -> Self::NeedsOverwriteResponseFut
Source§impl Clone for BlobCreatorProxy
impl Clone for BlobCreatorProxy
Source§fn clone(&self) -> BlobCreatorProxy
fn clone(&self) -> BlobCreatorProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlobCreatorProxy
impl Debug for BlobCreatorProxy
Source§impl Proxy for BlobCreatorProxy
impl Proxy for BlobCreatorProxy
Source§type Protocol = BlobCreatorMarker
type Protocol = BlobCreatorMarker
Proxy controls.