pub enum CrcCheck {
    Always,
    Never,
    OnError,
}
Expand description

Determines under what circumstances the parser should perform the crc check for replay corruption. Since the crc check is the most time consuming part when parsing the header, clients should choose under what circumstances a crc check is performed.

Variants

Always

Always perform the crc check. Useful when the replay has had its contents modified. This will catch a user that increased the number of goals they scored (easy) but only if they didn’t update the crc as well (not as easy).

Never

Never perform the crc check. Useful only when it doesn’t matter to know if a replay is corrupt or not, you either want the data or the parsing error.

OnError

Only perform the crc check when parsing a section fails. This option gets the best of both worlds. If parsing fails, the crc check will determine if it is a programming error or the replay is corrupt. If parsing succeeds it won’t precious time performing the check. This option is the default for parsing.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.