pub struct Namespace { /* private fields */ }
Implementations§
Source§impl Namespace
impl Namespace
Sourcepub fn open_deprecated(
&self,
path: &str,
flags: OpenFlags,
channel: Channel,
) -> Result<(), Status>
pub fn open_deprecated( &self, path: &str, flags: OpenFlags, 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_open in C.
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.