use serde_json::Value as JsonValue;
use langgraph_checkpoint::error::ChannelError;
pub trait Channel: Send + Sync + 'static {
fn checkpoint(&self) -> Option<JsonValue>;
fn from_checkpoint(&self, checkpoint: Option<&JsonValue>) -> Box<dyn Channel>;
fn update(&self, values: &[JsonValue]) -> Result<bool, ChannelError>;
fn get(&self) -> Result<JsonValue, ChannelError>;
fn consume(&self) -> bool {
false
}
fn finish(&self) -> bool {
false
}
fn is_available(&self) -> bool;
fn clone_channel(&self) -> Box<dyn Channel>;
fn name(&self) -> &str;
}