Something went wrong. Try again.
A user-space CRDT filesystem
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233//! Production backend: drives a real FSKit mount through [`fskit_rs::mount`].
use std::path::PathBuf;
use async_trait::async_trait;use fskit_rs::session::Session;use fskit_rs::{Filesystem, MountOptions};
use super::{Backend, Result};
#[derive(Debug)]pub struct ProdBackend { mount_point: PathBuf, // Held for its `Drop` impl, which unmounts and stops the socket. _session: Session,}
#[async_trait]impl Backend for ProdBackend { async fn start<FS>(fs: FS, opts: MountOptions) -> Result<Self> where FS: Filesystem + Send + Sync + Clone + 'static, { let mount_point = opts.mount_point.clone(); let session = fskit_rs::mount(fs, opts).await?; Ok(Self { mount_point, _session: session }) }
fn describe(&self) -> String { format!("FSKit mount at {}", self.mount_point.display()) }}