mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-04 02:24:12 +02:00
schemars
This commit is contained in:
parent
43b7270fcd
commit
93b51bff70
29 changed files with 15360 additions and 2187 deletions
|
|
@ -1,14 +1,9 @@
|
|||
use bitbuffer::{BitRead, BitWrite, BitWriteSized, BitWriteStream, LittleEndian};
|
||||
use serde::{Deserialize, Serialize};
|
||||
#[cfg(feature = "wasm")]
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use crate::{ReadResult, Stream};
|
||||
|
||||
#[cfg_attr(
|
||||
feature = "wasm",
|
||||
derive(wasm_typescript_definition::TypescriptDefinition)
|
||||
)]
|
||||
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct VoiceInitMessage {
|
||||
codec: String,
|
||||
|
|
@ -64,10 +59,7 @@ fn test_voice_init_roundtrip() {
|
|||
});
|
||||
}
|
||||
|
||||
#[cfg_attr(
|
||||
feature = "wasm",
|
||||
derive(wasm_typescript_definition::TypescriptDefinition)
|
||||
)]
|
||||
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
|
||||
#[derive(BitRead, BitWrite, Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[endianness = "LittleEndian"]
|
||||
#[serde(bound(deserialize = "'a: 'static"))]
|
||||
|
|
@ -79,10 +71,7 @@ pub struct VoiceDataMessage<'a> {
|
|||
data: Stream<'a>,
|
||||
}
|
||||
|
||||
#[cfg_attr(
|
||||
feature = "wasm",
|
||||
derive(wasm_typescript_definition::TypescriptDefinition)
|
||||
)]
|
||||
#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(bound(deserialize = "'a: 'static"))]
|
||||
pub struct ParseSoundsMessage<'a> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue