[][src]Struct genie_dat::Sound

pub struct Sound {
    pub id: SoundID,
    pub play_delay: i16,
    pub cache_time: i32,
    pub items: Vec<SoundItem>,
}

A "conceptual" sound, consisting of one or a group of sound files.

Items can be picked depending on the player's civilization, and depending on the probabilities for each file.

Fields

id: SoundID

Unique ID for this sound.

play_delay: i16

TODO document.

cache_time: i32

TODO document.

items: Vec<SoundItem>

List of sound files in this sound.

Implementations

impl Sound[src]

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

Read this sound from an input stream.

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

Write this sound to an input stream.

pub fn len(&self) -> usize[src]

Get the number of sound files that are part of this "conceptual" sound.

pub fn is_empty(&self) -> bool[src]

Returns true if there are no sound files.

Trait Implementations

impl Clone for Sound[src]

impl Debug for Sound[src]

impl Default for Sound[src]

Auto Trait Implementations

impl RefUnwindSafe for Sound

impl Send for Sound

impl Sync for Sound

impl Unpin for Sound

impl UnwindSafe for Sound

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.