pub struct Namespace { /* private fields */ }
Implementations§
Source§impl Namespace
impl Namespace
Sourcepub fn open(
&self,
path: &str,
flags: Flags,
channel: Channel,
) -> Result<(), Status>
pub fn open( &self, path: &str, flags: Flags, channel: Channel, ) -> Result<(), Status>
Open an object at |path| relative to the root of this namespace with |flags|.
|path| must be absolute.
This corresponds with fdio_ns_open3 in C.
Sourcepub fn bind(
&self,
path: &str,
channel: ClientEnd<DirectoryMarker>,
) -> Result<(), Status>
pub fn bind( &self, path: &str, channel: ClientEnd<DirectoryMarker>, ) -> Result<(), Status>
Create a new directory within the namespace, bound to the provided directory-protocol-compatible channel. The path must be an absolute path, like “/x/y/z”, containing no “.” nor “..” entries. It is relative to the root of the namespace.
This corresponds with fdio_ns_bind in C.
Sourcepub fn unbind(&self, path: &str) -> Result<(), Status>
pub fn unbind(&self, path: &str) -> Result<(), Status>
Unbind the channel at path, closing the associated handle when all references to the node go out of scope. The path must be an absolute path, like “/x/y/z”, containing no “.” nor “..” entries. It is relative to the root of the namespace.
This corresponds with fdio_ns_unbind in C.
pub fn export(&self) -> Result<Vec<NamespaceEntry>, Status>
pub fn into_raw(self) -> *mut fdio_namespace
Auto Trait Implementations§
impl Freeze for Namespace
impl RefUnwindSafe for Namespace
impl !Send for Namespace
impl !Sync for Namespace
impl Unpin for Namespace
impl UnwindSafe for Namespace
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