pub struct NamespaceBuilder { /* private fields */ }Expand description
Builds a Namespace. Obtain with Namespace::builder.
Implementations§
Source§impl NamespaceBuilder
impl NamespaceBuilder
Sourcepub fn mount(
self,
point: NsPath,
backend: Arc<dyn Backend>,
access: Access,
) -> Self
pub fn mount( self, point: NsPath, backend: Arc<dyn Backend>, access: Access, ) -> Self
Add a mount of backend at point with the given grant.
Sourcepub fn build(self) -> NsResult<Namespace>
pub fn build(self) -> NsResult<Namespace>
Finish. Refused: two mounts at the same (case-folded) path (AlreadyExists), two mounts over the same host
directory (InvalidInput(DuplicateRoot), from Backend::root_identity; the error names the later mount point),
and a ReadOnly mount nested under a ReadWrite one (InvalidInput(ReadOnlyUnderReadWrite)).
Overlap of one host directory inside another (an ancestor and a descendant) is not detected; see the module docs.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NamespaceBuilder
impl !UnwindSafe for NamespaceBuilder
impl Forget for NamespaceBuilder
impl Freeze for NamespaceBuilder
impl Move for NamespaceBuilder
impl Send for NamespaceBuilder
impl Sync for NamespaceBuilder
impl Unpin for NamespaceBuilder
impl UnsafeUnpin for NamespaceBuilder
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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 moreCreates a shared type from an unshared type.