[][src]Function quicksilver::load_file

pub fn load_file(
    path: impl AsRef<Path>
) -> impl Future<Output = Result<Vec<u8>, Error>>

Load a file as a Future

Within an async function (like the one passed to run), you can use .await:

load_file("my_file_path").await.expect("The file was not found!");

Create a Future that loads a file into an owned Vec of bytes

It exists for loading files from the server with Javascript on the web, and providing a unified API between desktop and the web when it comes to file loading