pub enum BlobCreatorRequest {
Create {
hash: [u8; 32],
allow_existing: bool,
responder: BlobCreatorCreateResponder,
},
NeedsOverwrite {
blob_hash: [u8; 32],
responder: BlobCreatorNeedsOverwriteResponder,
},
}Variants§
Create
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.
NeedsOverwrite
Given the hash of a blob, returns true if it should be overwritten using Create with
allow_existing set to true. Must respond the same as BlobReader.GetVmo in terms of
existence checks, responding ZX_ERR_NOT_FOUND under the same conditions.
Implementations§
Source§impl BlobCreatorRequest
impl BlobCreatorRequest
pub fn into_create(self) -> Option<([u8; 32], bool, BlobCreatorCreateResponder)>
pub fn into_needs_overwrite( self, ) -> Option<([u8; 32], BlobCreatorNeedsOverwriteResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL