[][src]Struct genie_dat::Civilization

pub struct Civilization { /* fields omitted */ }

Information about a civilization.

Implementations

impl Civilization[src]

pub fn name(&self) -> &str[src]

Get the name of this civilization.

pub fn read_from(input: impl Read, version: GameVersion) -> Result<Self>[src]

Read civilization data from an input stream.

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

Write civilization data to an output stream.

pub fn get_unit_type(&self, id: impl Into<UnitTypeID>) -> Option<&UnitType>[src]

Get a unit type by its ID.

Trait Implementations

impl Clone for Civilization[src]

impl Debug for Civilization[src]

impl Default for Civilization[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.