use async_trait::async_trait;
use cellos_core::ports::{CellBackend, CellHandle, TeardownReport};
use cellos_core::{CellosError, ExecutionCellDocument};
const UNSUPPORTED: &str =
"WindowsCellBackend is only supported on Windows (Job Object isolation); \
compiled as a stub on this host";
#[derive(Default)]
pub struct WindowsCellBackend;
impl WindowsCellBackend {
pub fn new() -> Self {
Self
}
}
#[async_trait]
impl CellBackend for WindowsCellBackend {
async fn create(&self, _spec: &ExecutionCellDocument) -> Result<CellHandle, CellosError> {
Err(CellosError::Host(UNSUPPORTED.into()))
}
async fn destroy(&self, _handle: &CellHandle) -> Result<TeardownReport, CellosError> {
Err(CellosError::Host(UNSUPPORTED.into()))
}
}