Struct sl4f_lib::common_utils::namespace_binder::NamespaceBinder
source · pub struct NamespaceBinder { /* private fields */ }
Expand description
Helper for binding entries in the namespace of the current process.
Namespace entries for served protocols are unbound when NamespaceBinder
is dropped.
Implementations§
source§impl NamespaceBinder
impl NamespaceBinder
pub fn new(scope: ExecutionScope) -> NamespaceBinder
sourcepub fn bind_at_path(
&mut self,
path: &str,
entry: Arc<dyn DirectoryEntry>
) -> Result<(), Error>
pub fn bind_at_path( &mut self, path: &str, entry: Arc<dyn DirectoryEntry> ) -> Result<(), Error>
Serves a protocol at the given path in the namespace of the current process.
path
must be absolute, e.g. “/foo/bar”, containing no “.” nor “..” entries.
It is relative to the root of the namespace.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NamespaceBinder
impl !RefUnwindSafe for NamespaceBinder
impl Send for NamespaceBinder
impl Sync for NamespaceBinder
impl Unpin for NamespaceBinder
impl !UnwindSafe for NamespaceBinder
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> Encode<Ambiguous1> for T
impl<T> Encode<Ambiguous1> for T
source§impl<T> Encode<Ambiguous2> for T
impl<T> Encode<Ambiguous2> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoAny for T
impl<T> IntoAny for T
source§impl<T> OptionalField for Twhere
T: ?Sized,
impl<T> OptionalField for Twhere
T: ?Sized,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
source§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.