Struct SampleInfo

Source
pub struct SampleInfo<'a> {
    pub index: u32,
    pub name: Option<Cow<'a, str>>,
    pub volume: ChannelVolumes,
    pub sample_spec: Spec,
    pub channel_map: Map,
    pub duration: MicroSeconds,
    pub bytes: u32,
    pub lazy: bool,
    pub filename: Option<Cow<'a, str>>,
    pub proplist: Proplist,
}
Expand description

Stores information about sample cache entries.

Please note that this structure can be extended as part of evolutionary API updates at any time in any new release.

Fields§

§index: u32

Index of this entry.

§name: Option<Cow<'a, str>>

Name of this entry.

§volume: ChannelVolumes

Default volume of this entry.

§sample_spec: Spec

Sample specification of the sample.

§channel_map: Map

The channel map.

§duration: MicroSeconds

Duration of this entry.

§bytes: u32

Length of this sample in bytes.

§lazy: bool

Non-zero when this is a lazy cache entry.

§filename: Option<Cow<'a, str>>

In case this is a lazy cache entry, the filename for the sound file to be loaded on demand.

§proplist: Proplist

Property list for this sample.

Implementations§

Source§

impl SampleInfo<'_>

Source

pub fn to_owned(&self) -> SampleInfo<'static>

Creates a copy with owned data.

Trait Implementations§

Source§

impl<'a> Debug for SampleInfo<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for SampleInfo<'a>

§

impl<'a> RefUnwindSafe for SampleInfo<'a>

§

impl<'a> Send for SampleInfo<'a>

§

impl<'a> Sync for SampleInfo<'a>

§

impl<'a> Unpin for SampleInfo<'a>

§

impl<'a> UnwindSafe for SampleInfo<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.