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
strict: bool
commands: bool
command_bytes: bool
clean_file: bool
Methods
impl Config
[src]
fn new(
strict: bool,
commands: bool,
command_bytes: bool,
clean_file: bool
) -> Config
strict: bool,
commands: bool,
command_bytes: bool,
clean_file: bool
) -> Config
Constructs a new Config
structure with the given options set.
Trait Implementations
impl Debug for Config
[src]
impl Copy for Config
[src]
impl Clone for Config
[src]
fn clone(&self) -> Config
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Encodable for Config
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
Serialize a value using an Encoder
.
impl Default for Config
[src]
fn default() -> Self
Constructs a new Config
structure with default options set.