pub struct Namespace { /* private fields */ }
Implementations§
source§impl Namespace
impl Namespace
sourcepub fn open(
&self,
path: &str,
flags: OpenFlags,
channel: Channel
) -> Result<(), Status>
pub fn open( &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 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 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