Files
VoelinClient/crates/proto/ts-bookkeeping/build/messages_to_book_parser.rs
T
Claude 1cb7b0bdf2 vendor: import ReSpeak/tsclientlib@ee3bc6f
Unmodified copy of the tsclientlib workspace crates (MIT OR Apache-2.0)
with the tsdeclarations submodule (83cb8a9) flattened into plain files.
See crates/proto/UPSTREAM.md for the path mapping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
2026-09-25 12:46:11 +00:00

29 lines
869 B
Rust

use std::collections::HashMap;
use std::default::Default;
use std::ops::Deref;
use heck::*;
use t4rust_derive::Template;
use tsproto_structs::book::{PropId, Property};
use tsproto_structs::messages::Field;
use tsproto_structs::messages_to_book::*;
use tsproto_structs::*;
#[derive(Template)]
#[TemplatePath = "build/MessagesToBook.tt"]
#[derive(Debug)]
pub struct MessagesToBookDeclarations<'a>(&'a messages_to_book::MessagesToBookDeclarations<'a>);
impl<'a> Deref for MessagesToBookDeclarations<'a> {
type Target = messages_to_book::MessagesToBookDeclarations<'a>;
fn deref(&self) -> &Self::Target { self.0 }
}
impl Default for MessagesToBookDeclarations<'static> {
fn default() -> Self { MessagesToBookDeclarations(&DATA) }
}
fn get_property(p: &Property, name: &str) -> String {
format!("PropertyValue::{}({})", p.get_inner_type_as_name().unwrap(), name)
}