feat: define Ctx to hold context (e.g. fs and net handles)
Some checks failed
Test / build (map[name:nightly]) (push) Successful in 1m31s
Test / build (map[name:stable]) (push) Successful in 2m4s
Release Please / Release-plz (push) Failing after 15s

This commit is contained in:
Paul Campbell 2024-11-29 14:31:40 +00:00
parent 843c3eb8b2
commit 93158ea0a0
2 changed files with 19 additions and 2 deletions

View file

@ -15,7 +15,7 @@ color-eyre = "0.6"
# "from",
#] }
# kxio = {path = "../kxio/"}
## kxio = "3.1"
kxio = "3.2"
#serde = { version = "1.0", features = ["derive"] }
#serde_json = "1.0"
tokio = { version = "1.41", features = ["full"] }

View file

@ -1 +1,18 @@
//
use std::path::PathBuf;
use kxio::{fs::FileSystem, net::Net};
#[derive(Clone)]
pub struct Ctx {
pub fs: FileSystem,
pub net: Net,
}
impl Default for Ctx {
fn default() -> Self {
Self {
fs: kxio::fs::new(PathBuf::default()),
net: kxio::net::new(),
}
}
}