Crate vault

source ·
Expand description

vault is a Company of Heroes 3 replay parser written with nom, and exposing Ruby bindings via magnus.

Currently, this library is able to parse player, map, and chat message data, as well as various bits and pieces of basic replay information. It is not currently able to parse detailed command information

To use, simply initialize an instance of Replay by using one of its parsing entrypoints:

fn main() {
    let data = include_bytes!("/path/to/replay.rec");
    let replay = vault::Replay::from_bytes(data);
    assert!(replay.is_ok())
}

Re-exports§

Modules§

Structs§

  • Representation of all map-related information that can be parsed from a Company of Heroes 3 replay
  • Representation of a user-sent chat message in a Company of Heroes 3 replay. Messages are collected during command parsing and then associated with the Player instance that sent them. To access, see Player::messages.
  • Game-specific player representation. Includes generally immutable information alongside data specific to the replay being parsed.
  • A complete representation of all information able to be parsed from a Company of Heroes 3 replay. Note that parsing is not yet exhaustive, and iterative improvements will be made to pull more information from replay files over time.

Enums§

  • Company of Heroes 3 factions.
  • Company of Heroes 3 game types
  • Representation of a player’s team membership.

Type Aliases§

  • Represents a failure in parsing at some point in the combinator chain. Parsing fails eagerly; that is, the first failure point hit will exit with an error. This type returns an error that includes information on the segment of bytes being parsed and the location of the cursor at time of failure.