//! 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, opts: MountOptions) -> Result 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()) } }