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
fio::PERM_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
fio::PERM_WRITABLE
which needed so that Client::delete_blob
can unlink the file.
Sourcepub fn executable(self) -> Self
pub fn executable(self) -> Self
If set, Client
will connect to /blob in the current component’s namespace with
fio::PERM_EXECUTABLE
.
Trait Implementations§
Source§impl Default for ClientBuilder
impl Default for ClientBuilder
Source§fn default() -> ClientBuilder
fn default() -> ClientBuilder
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnwindSafe for ClientBuilder
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more