[][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),
    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.

IoError(Error)

An error occurred while reading or writing.

Trait Implementations

impl From<Error> for Error[src]

impl From<ParseDiplomaticStanceError> for Error[src]

impl From<ParseDataSetError> for Error[src]

impl From<ParseDLCPackageError> for Error[src]

impl From<ParseStartingAgeError> for Error[src]

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

fn description(&self) -> &str1.0.0[src]

This method is soft-deprecated. Read more

fn cause(&self) -> Option<&dyn Error>1.0.0[src]

Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

The lower-level cause of this error, if any. Read more

fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]

The lower-level source of this error, if any. Read more

Auto Trait Implementations

impl Sync for Error

impl Unpin for Error

impl Send for Error

impl !UnwindSafe for Error

impl !RefUnwindSafe for Error

Blanket Implementations

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

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

impl<T> From<T> for T[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.

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

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

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