Struct hldemo::Demo [] [src]

pub struct Demo<'a> {
    pub header: Header<'a>,
    pub directory: Directory<'a>,
}

A Goldsource demo.

Fields

Methods

impl<'a> Demo<'a>
[src]

[src]

Parses a demo.

Examples

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)?;

[src]

Parses a demo's header and directory, without parsing frame data.

Parsing frames usually takes a long time, so this function can be used when the frame data isn't needed.

Examples

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_without_frames(&bytes)?;

Trait Implementations

impl<'a> Debug for Demo<'a>
[src]

[src]

Formats the value using the given formatter.

impl<'a> PartialEq for Demo<'a>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.