platter 0.1.4

Load files on web and desktop asynchronously
Documentation
1
2
3
4
5
use std::{fs::read, future::Future, io::Error as IOError, path::Path};

pub fn load_file(path: impl AsRef<Path>) -> impl Future<Output = Result<Vec<u8>, IOError>> {
    futures_util::future::ready(read(path))
}