[][src]Struct genie_scx::SCXHeader

pub struct SCXHeader {
    pub version: u32,
    pub timestamp: u32,
    pub description: Option<String>,
    pub author_name: Option<String>,
    pub any_sp_victory: bool,
    pub active_player_count: u32,
    pub dlc_options: Option<DLCOptions>,
}

Fields

version: u32

Version of the header.

Versions 2 and up include a save timestamp. Versions 3 and up contain HD Edition DLC information.

timestamp: u32

Unix timestamp when this scenario was created, in seconds.

description: Option<String>

Description text about the scenario.

author_name: Option<String>

Name of the person who created this scenario. Only available in DE2.

any_sp_victory: bool

Whether the scenario has any victory conditions for singleplayer.

active_player_count: u32

How many players are supported by this scenario.

dlc_options: Option<DLCOptions>

HD Edition DLC information.

Implementations

impl SCXHeader[src]

pub fn read_from(
    input: impl Read,
    format_version: SCXVersion
) -> Result<SCXHeader>
[src]

Parse an SCX header from a byte stream.

pub fn write_to(
    &self,
    output: impl Write,
    format_version: SCXVersion,
    version: u32
) -> Result<()>
[src]

Serialize an SCX header to a byte stream.

pub fn touch(&mut self) -> Result<(), SystemTimeError>[src]

Update the timestamp.

Trait Implementations

impl Clone for SCXHeader[src]

impl Debug for SCXHeader[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.