fn with_fd_handle<F, T>(&self, fd: Fd, f: F) -> WasmResult<T>
    where
        F: FnOnce(Arc<Scheme>, FileHandle) -> WasmResult<T>,
    {
        with_current_thread(|thread| {
            let tbl = thread.file_descriptor_table();
            let fd = tbl.get(fd as FileIdx).ok_or(Errno::BadF)?;
            let (scheme, handle) = fd.scheme_and_handle()?;
            drop(tbl);
            f(scheme, handle)
        })
    }
/// Execute with fd handle context.
Execute with fd handle context.
Execute with fd handle context .
fn with_fd_handle<F, T>(&self, fd: Fd, f: F) -> WasmResult<T>
    where
        F: FnOnce(Arc<Scheme>, FileHandle) -> WasmResult<T>,
    {
        with_current_thread(|thread| {
            let tbl = thread.file_descriptor_table();
            let fd = tbl.get(fd as FileIdx).ok_or(Errno::BadF)?;
            let (scheme, handle) = fd.scheme_and_handle()?;
            drop(tbl);
            f(scheme, handle)
        })
    }
fn with_fd_handle < F , T > ( & self , fd : Fd , f : F ) -> WasmResult < T > where F : FnOnce ( Arc < Scheme > , FileHandle ) -> WasmResult < T > , { with_current_thread ( | thread | { let tbl = thread . file_descriptor_table ( ) ; let fd = tbl . get ( fd as FileIdx ) . ok_or ( Errno :: BadF ) ? ; let ( scheme , handle ) = fd . scheme_and_handle ( ) ? ; drop ( tbl ) ; f ( scheme , handle ) } ) }
Execute with fd handle context.
Execute with fd handle context .
&self
fd
Fd
f
F
&self
fd
Fd
f
F