Skip to main content

okbot_core/
render.rs

1//! The renderer port.
2
3use crate::caps::ChannelCaps;
4use crate::message::RenderedMessage;
5
6/// Turns canonical Markdown into platform messages: the platform's dialect, each part within its
7/// length limit.
8pub trait Renderer: Send + Sync {
9    /// Renders `markdown` for a channel with `caps`. Returns at least one message for non-empty input.
10    fn render(&self, markdown: &str, caps: &ChannelCaps) -> Vec<RenderedMessage>;
11}