pub struct HostDir { /* private fields */ }Expand description
Opaque host directory stream (DIR*) with optional getdents batching.
Implementations§
Source§impl HostDir
impl HostDir
Sourcepub fn open_dup(host_fd: RawFd) -> Result<Self, i32>
pub fn open_dup(host_fd: RawFd) -> Result<Self, i32>
Open a directory stream on a duplicate of host_fd (does not own host_fd).
Sourcepub fn read_next_into(&mut self, name_out: &mut [u8]) -> Option<u8>
pub fn read_next_into(&mut self, name_out: &mut [u8]) -> Option<u8>
Next entry into name_out (NUL-terminated). Returns d_type, or None at EOF.
No heap allocation: name is copied into the caller buffer (max name_out.len()-1 bytes).
Trait Implementations§
impl Send for HostDir
impl Sync for HostDir
Auto Trait Implementations§
impl Freeze for HostDir
impl RefUnwindSafe for HostDir
impl Unpin for HostDir
impl UnsafeUnpin for HostDir
impl UnwindSafe for HostDir
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