fn with_fd<F, T>(&self, fd: Fd, f: F) -> WasmResult<T>
    where
        F: FnOnce(&FileDescriptor) -> WasmResult<T>,
    {
        with_current_thread(|thread| {
            let tbl = thread.file_descriptor_table();
            f(tbl.get(fd as FileIdx).ok_or(Errno::BadF)?)
        })
    }
/// Execute with full fd context.
Execute with full fd context.
Execute with full fd context .
fn with_fd<F, T>(&self, fd: Fd, f: F) -> WasmResult<T>
    where
        F: FnOnce(&FileDescriptor) -> WasmResult<T>,
    {
        with_current_thread(|thread| {
            let tbl = thread.file_descriptor_table();
            f(tbl.get(fd as FileIdx).ok_or(Errno::BadF)?)
        })
    }
fn with_fd < F , T > ( & self , fd : Fd , f : F ) -> WasmResult < T > where F : FnOnce ( & FileDescriptor ) -> WasmResult < T > , { with_current_thread ( | thread | { let tbl = thread . file_descriptor_table ( ) ; f ( tbl . get ( fd as FileIdx ) . ok_or ( Errno :: BadF ) ? ) } ) }
Execute with full fd context.
Execute with full fd context .
&self
fd
Fd
f
F
&self
fd
Fd
f
F