#[cfg(feature = "ssr")]
pub mod http;
use async_trait::async_trait;
use serde_json::Value;
use thiserror::Error;
#[derive(Debug, Clone, Default)]
pub struct SsrPayload {
pub head: Vec<String>,
pub body: String,
}
#[derive(Debug, Error)]
pub enum SsrError {
#[error("ssr transport: {0}")]
Transport(String),
#[error("ssr decode: {0}")]
Decode(String),
}
#[async_trait]
pub trait SsrClient: Send + Sync {
async fn render(&self, page: &Value) -> Result<SsrPayload, SsrError>;
}