[][src]Struct genie_dat::SoundItem

pub struct SoundItem {
    pub filename: ArrayString<[u8; 13]>,
    pub resource_id: i32,
    pub probability: i16,
    pub civilization: Option<i16>,
    pub icon_set: Option<i16>,
}

A single sound file.

Fields

filename: ArrayString<[u8; 13]>

Internal file name for this sound file.

resource_id: i32

DRS file ID for this sound file.

probability: i16

The probability out of 100% that this file will be used for any given playback.

civilization: Option<i16>

Use this file for this civilization ID only.

icon_set: Option<i16>

File icon set (TODO what does this do?)

Implementations

impl SoundItem[src]

pub fn read_from<R: Read>(input: &mut R, _version: FileVersion) -> Result<Self>[src]

Read this sound item from an input stream.

pub fn write_to<W: Write>(
    &self,
    output: &mut W,
    _version: FileVersion
) -> Result<()>
[src]

Write this sound item to an input stream.

Trait Implementations

impl Clone for SoundItem[src]

impl Debug for SoundItem[src]

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