pub fn hook(&self, fd: u32, buf: &[u8]) -> eyre::Result<Vec<Vec<u8>>> {
        Ok(self
            .hook_registry
            .get(fd)
            .ok_or(eyre::eyre!("no hook found for file descriptor {}", fd))?
            .invoke_hook(self.hook_env(), buf))
    }
Invokes a hook with the given file descriptor `fd` with the data `buf`.

# Errors

If the file descriptor is not found in the [``HookRegistry``], this function will return an
error.
crates/core/executor/src/executor.rs