Expand description
Demo rewriting APIs and lower-level bitstream writer utilities.
This module is the preferred import path for writing or rewriting demo
files. It includes DemoWriter,
DemoRewriter, packet message helpers, and
the bitstream writer utilities used by advanced rewrites.
Re-exports§
pub use crate::error::ParserError;
Structs§
- Demo
Writer - Demo writer that reads demo messages and writes a rewritten stream.
- Packet
Message - Packet message passed to packet-list rewriters.
- Rewrite
Interests - Bitflags for declaring rewrite interests.
- String
Table Entry Update - A mutable string table entry update passed to demo rewriters.
Enums§
- Message
Rewrite - Outcome for a message rewrite operation.
Traits§
- Demo
Rewriter - Trait for handling demo rewrites.
Functions§
- rewrite_
protobuf_ message - Rewrites a prost message by decoding, mutating, and re-encoding it.
- write_
demo_ message - Writes a demo command message and returns the number of bytes emitted.
- write_
demo_ message_ with_ compression - Writes a demo command message, optionally Snappy-compressing the payload.
- write_
var_ u32_ to_ buf - Appends an unsigned varint used for 32-bit demo fields to a byte buffer.
- write_
var_ u32_ to_ vec - Encodes an unsigned varint used for 32-bit demo fields into a new byte vector.
- write_
var_ u64_ to_ buf - Appends an unsigned 64-bit varint to a byte buffer.
- write_
var_ u64_ to_ vec - Encodes an unsigned 64-bit varint into a new byte vector.
Attribute Macros§
- replace_
entity_ field - Replaces decoded entity field values with custom logic.
- rewrite_
demo_ message - Rewrites an outer demo command payload.
- rewrite_
demo_ string_ tables - Rewrites a decoded
CDemoStringTablesouter demo message. - rewrite_
field - Replaces decoded entity field values with class and field filters.
- rewrite_
packet_ message - Rewrites an individual message inside a demo packet.
- rewrite_
packet_ messages - Mutates the decoded packet message list after per-message rewrites.
- rewrite_
string_ table_ entry - Rewrites one decoded string table entry update.
- rewrite_
svc_ create_ string_ table - Rewrites a decoded
svc_CreateStringTablepacket message. - rewrite_
svc_ update_ string_ table - Rewrites a decoded
svc_UpdateStringTablepacket message. - rewriter
- Implements the
DemoRewritertrait for your struct. - should_
rewrite_ entity - Filters which entities enter the entity field rewrite path.
- should_
track_ entity - Filters which entities retain decoded field state while rewriting.