[][src]Enum genie_scx::Error

pub enum Error {
    MissingFileNameError,
    UnsupportedFormatVersionError(SCXVersion),
    TooManyDisabledTechsError(i32),
    CannotDisableTechsError,
    CannotDisableUnitsError,
    TooManyDisabledBuildingsError(i32i32),
    CannotDisableBuildingsError,
    DecodeStringError(DecodeStringError),
    EncodeStringError(EncodeStringError),
    ParseDiplomaticStanceError(ParseDiplomaticStanceError),
    ParseDataSetError(ParseDataSetError),
    ParseDLCPackageError(ParseDLCPackageError),
    ParseStartingAgeError(ParseStartingAgeError),
    ParseAIErrorCodeError(TryFromPrimitiveError<AIErrorCode>),
    IoError(Error),
}

Error type for SCX methods, containing all types of errors that may occur while reading or writing scenario files.

Variants

MissingFileNameError

The scenario that's attempted to be read does not contain a file name.

UnsupportedFormatVersionError(SCXVersion)

Attempted to read a scenario with an unsupported format version identifier.

TooManyDisabledTechsError(i32)

Attempted to write a scenario with disabled technologies, to a version that doesn't support this many disabled technologies.

CannotDisableTechsError

Attempted to write a scenario with disabled technologies, to a version that doesn't support disabling technologies.

CannotDisableUnitsError

Attempted to write a scenario with disabled units, to a version that doesn't support disabling units.

TooManyDisabledBuildingsError(i32i32)

Attempted to write a scenario with disabled buildings, to a version that doesn't support this many disabled buildings.

CannotDisableBuildingsError

Attempted to write a scenario with disabled buildings, to a version that doesn't support disabling buildings.

DecodeStringError(DecodeStringError)

Failed to decode a string from the scenario file, probably because of a wrong encoding.

EncodeStringError(EncodeStringError)

Failed to encode a string into the scenario file, probably because of a wrong encoding.

ParseDiplomaticStanceError(ParseDiplomaticStanceError)

The given ID is not a known diplomatic stance.

ParseDataSetError(ParseDataSetError)

The given ID is not a known data set.

ParseDLCPackageError(ParseDLCPackageError)

The given ID is not a known HD Edition DLC.

ParseStartingAgeError(ParseStartingAgeError)

The given ID is not a known starting age in AoE1 or AoE2.

ParseAIErrorCodeError(TryFromPrimitiveError<AIErrorCode>)

The given ID is not a known error code.

IoError(Error)

An error occurred while reading or writing.

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl From<DecodeStringError> for Error[src]

impl From<EncodeStringError> for Error[src]

impl From<Error> for Error[src]

impl From<ParseDLCPackageError> for Error[src]

impl From<ParseDataSetError> for Error[src]

impl From<ParseDiplomaticStanceError> for Error[src]

impl From<ParseStartingAgeError> for Error[src]

impl From<ReadStringError> for Error[src]

impl From<TryFromPrimitiveError<AIErrorCode>> for Error[src]

impl From<WriteStringError> for Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.