edjr 0.1.1

Elite Dangerous Journal Reader
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use {
    crate::{Journal, error::JournalError},
    std::path::Path,
    tokio::fs::File,
};

impl Journal<File> {
    pub async fn open(path: impl AsRef<Path>) -> Result<Journal<File>, JournalError> {
        let file = File::open(path)
            .await
            .map_err(|err| JournalError::OpenError(err))?;

        Ok(Self { file })
    }
}