pub struct FileDescriptorTable { /* private fields */ }Implementations§
Source§impl FileDescriptorTable
impl FileDescriptorTable
pub fn new() -> Self
pub fn with_stdio( stdin: Arc<Mutex<dyn File>>, stdout: Arc<Mutex<dyn File>>, stderr: Arc<Mutex<dyn File>>, ) -> Self
pub fn alloc(&mut self, file: Arc<Mutex<dyn File>>) -> Option<FileDescriptor>
pub fn dealloc(&mut self, fd: FileDescriptor) -> bool
pub fn get(&self, fd: FileDescriptor) -> Option<Arc<Mutex<dyn File>>>
pub fn is_valid(&self, fd: FileDescriptor) -> bool
pub fn dup2( &mut self, old_fd: FileDescriptor, new_fd: FileDescriptor, ) -> Option<FileDescriptor>
pub fn count(&self) -> usize
pub fn capacity(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FileDescriptorTable
impl !UnwindSafe for FileDescriptorTable
impl Freeze for FileDescriptorTable
impl Send for FileDescriptorTable
impl Sync for FileDescriptorTable
impl Unpin for FileDescriptorTable
impl UnsafeUnpin for FileDescriptorTable
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