Crate hldemo [] [src]

A parser for Goldsource demo files (this includes Half-Life and its mods) written in Rust using nom.

Supports parsing demos completely as well as just header and directory when the frame data isn't needed. Exports both raw nom parsing functions and wrappers which hide all nom-related types and provide convenient errors.

Examples

Check the examples folder for more complete program examples which output various data from demos.

extern crate hldemo;

use std::fs::File;
use std::io::Read;

let mut bytes = Vec::new();
let mut f = File::open("demo.dem")?;
f.read_to_end(&mut bytes);

let demo = hldemo::Demo::parse(&bytes)?;

Modules

errors

An error type wrapping nom's parsing errors and some glue between the two.

parse

Nom parsing functions for demo parsing.

Structs

ClientDataData
ConsoleCommandData
Demo

A Goldsource demo.

DemoBufferData
Directory
DirectoryEntry
EventArgs
EventData
Frame
Header
MoveVars
NetMsgData
NetMsgInfo
RefParams
SoundData
UserCmd
WeaponAnimData

Enums

FrameData