Struct vault::Config [] [src]

pub struct Config {
    pub strict: bool,
    pub commands: bool,
    pub command_bytes: bool,
    pub clean_file: bool,
}

This type contains option and configuration information for a call to one of vault's parsing functions.

strict

default: false

If true, vault will fail to parse any file that doesn't have the .rec file extension, or .zip if parse_archive or parse_any are called. If false, a file with no extension will be treated as a .rec file and parsing will be attempted.

commands

default: true

If true, vault will parse all commands in the replay and store them as Command objects in the Replay type's commands HashMap. If false, vault will skip entirely any command parsing. Note that setting this command to false will improve parsing speed but make it impossible to determine which commanders were selected by which players.

command_bytes

default: false

If true, vault will store the full byte sequence of every command in the bytes field of the corresponding Command object. This is largely a debugging function used to display the command byte sequence in order to improve parsing logic. Note that this setting does nothing if commands is set to false.

clean_file

default: true

If true, vault will empty the internal data vector used to store raw replay bytes in the Replay object's file Stream instance. This is done to prevent vast amounts of junk data from being serialized if we wish to convert a Replay to JSON.

Fields

Methods

impl Config
[src]

Constructs a new Config structure with the given options set.

Trait Implementations

impl Debug for Config
[src]

Formats the value using the given formatter.

impl Copy for Config
[src]

impl Clone for Config
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Encodable for Config
[src]

Serialize a value using an Encoder.

impl Default for Config
[src]

Constructs a new Config structure with default options set.