1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 02:24:12 +02:00
This commit is contained in:
Robin Appelman 2021-07-25 17:04:50 +02:00
commit 43b7270fcd
29 changed files with 3818 additions and 76 deletions

View file

@ -13,13 +13,23 @@ use crate::demo::parser::{Encode, ParseBitSkip};
use crate::{Parse, ParseError, ParserState, ReadResult, Result, Stream};
use std::borrow::Cow;
use std::cmp::min;
#[cfg(feature = "wasm")]
use wasm_bindgen::prelude::*;
#[cfg_attr(
feature = "wasm",
derive(wasm_typescript_definition::TypescriptDefinition)
)]
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(bound(deserialize = "'a: 'static"))]
pub struct CreateStringTableMessage<'a> {
pub table: StringTable<'a>,
}
#[cfg_attr(
feature = "wasm",
derive(wasm_typescript_definition::TypescriptDefinition)
)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StringTableMeta {
pub max_entries: u16,
@ -235,6 +245,10 @@ fn test_create_string_table_roundtrip() {
);
}
#[cfg_attr(
feature = "wasm",
derive(wasm_typescript_definition::TypescriptDefinition)
)]
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(bound(deserialize = "'a: 'static"))]
pub struct UpdateStringTableMessage<'a> {