use super::v1;
pub struct Known {
pub name: &'static str,
pub version: &'static str,
pub frame_header_max_bytes: Option<u32>,
pub envelope_bytes: Option<u32>,
}
pub const KNOWN: &[Known] = &[];
pub fn bindings() -> Vec<v1::Binding> {
render(KNOWN)
}
pub(super) fn render(table: &[Known]) -> Vec<v1::Binding> {
let mut rows: Vec<&Known> = table.iter().collect();
rows.sort_by_key(|row| row.name);
rows.into_iter()
.map(|row| v1::Binding {
name: row.name.to_string(),
version: row.version.to_string(),
frame_header_max_bytes: row.frame_header_max_bytes,
envelope_bytes: row.envelope_bytes,
})
.collect()
}