Struct blobfs::ClientBuilder
source · pub struct ClientBuilder { /* private fields */ }
Expand description
A builder for Client
Implementations§
source§impl ClientBuilder
impl ClientBuilder
sourcepub async fn build(self) -> Result<Client, BlobfsError>
pub async fn build(self) -> Result<Client, BlobfsError>
Opens the /blob directory in the component’s namespace with readable, writable, and/or
executable flags. Connects to the fuchsia.fxfs.BlobCreator and BlobReader if requested.
Connects to and initializes the VmexResource if use_vmex
is set. Returns a Client
.
sourcepub fn use_reader(self) -> Self
pub fn use_reader(self) -> Self
Client
will connect to and use fuchsia.fxfs/BlobReader for reads. Sets the VmexResource
for Client
. The VmexResource is used by get_backing_memory
to mark blobs as executable.
sourcepub fn use_reader_no_vmex(self) -> Self
pub fn use_reader_no_vmex(self) -> Self
Client
will connect to and use fuchsia.fxfs/BlobReader for reads. Does not set the
VmexResource.
sourcepub fn use_creator(self) -> Self
pub fn use_creator(self) -> Self
If set, Client
will connect to and use fuchsia.fxfs/BlobCreator for writes.
sourcepub fn readable(self) -> Self
pub fn readable(self) -> Self
If set, Client
will connect to /blob in the current component’s namespace with
OPEN_RIGHT_READABLE.
sourcepub fn writable(self) -> Self
pub fn writable(self) -> Self
If set, Client
will connect to /blob in the current component’s namespace with
OPEN_RIGHT_WRITABLE. WRITABLE is needed so that delete_blob
can call
fuchsia.io/Directory.Unlink.
sourcepub fn executable(self) -> Self
pub fn executable(self) -> Self
If set, Client
will connect to /blob in the current component’s namespace with
OPEN_RIGHT_EXECUTABLE.