pub struct BlobCreatorSynchronousProxy { /* private fields */ }Implementations§
Source§impl BlobCreatorSynchronousProxy
impl BlobCreatorSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<BlobCreatorEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<BlobCreatorEvent, 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 create(
&self,
hash: &[u8; 32],
allow_existing: bool,
___deadline: MonotonicInstant,
) -> Result<BlobCreatorCreateResult, Error>
pub fn create( &self, hash: &[u8; 32], allow_existing: bool, ___deadline: MonotonicInstant, ) -> Result<BlobCreatorCreateResult, Error>
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],
___deadline: MonotonicInstant,
) -> Result<BlobCreatorNeedsOverwriteResult, Error>
pub fn needs_overwrite( &self, blob_hash: &[u8; 32], ___deadline: MonotonicInstant, ) -> Result<BlobCreatorNeedsOverwriteResult, Error>
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 Debug for BlobCreatorSynchronousProxy
impl Debug for BlobCreatorSynchronousProxy
Source§impl From<BlobCreatorSynchronousProxy> for Handle
Available on Fuchsia only.
impl From<BlobCreatorSynchronousProxy> for Handle
Source§fn from(value: BlobCreatorSynchronousProxy) -> Self
fn from(value: BlobCreatorSynchronousProxy) -> Self
Source§impl From<Channel> for BlobCreatorSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for BlobCreatorSynchronousProxy
Source§impl FromClient for BlobCreatorSynchronousProxy
Available on Fuchsia only.
impl FromClient for BlobCreatorSynchronousProxy
Source§type Protocol = BlobCreatorMarker
type Protocol = BlobCreatorMarker
Source§fn from_client(value: ClientEnd<BlobCreatorMarker>) -> Self
fn from_client(value: ClientEnd<BlobCreatorMarker>) -> Self
Source§impl SynchronousProxy for BlobCreatorSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for BlobCreatorSynchronousProxy
Source§type Proxy = BlobCreatorProxy
type Proxy = BlobCreatorProxy
Source§type Protocol = BlobCreatorMarker
type Protocol = BlobCreatorMarker
Proxy controls.