Struct oxygengine_audio::component::AudioSourceConfig
source · pub struct AudioSourceConfig {
pub audio: Cow<'static, str>,
pub streaming: bool,
pub looped: bool,
pub playback_rate: Scalar,
pub volume: Scalar,
pub play: bool,
}
Fields§
§audio: Cow<'static, str>
§streaming: bool
§looped: bool
§playback_rate: Scalar
§volume: Scalar
§play: bool
Implementations§
source§impl AudioSourceConfig
impl AudioSourceConfig
pub fn new(audio: Cow<'static, str>) -> Self
pub fn audio(self, value: Cow<'static, str>) -> Self
pub fn streaming(self, value: bool) -> Self
pub fn looped(self, value: bool) -> Self
pub fn playback_rate(self, value: Scalar) -> Self
pub fn volume(self, value: Scalar) -> Self
pub fn play(self, value: bool) -> Self
Trait Implementations§
source§impl Clone for AudioSourceConfig
impl Clone for AudioSourceConfig
source§fn clone(&self) -> AudioSourceConfig
fn clone(&self) -> AudioSourceConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AudioSourceConfig
impl Debug for AudioSourceConfig
source§impl<'de> Deserialize<'de> for AudioSourceConfig
impl<'de> Deserialize<'de> for AudioSourceConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<AudioSourceConfig> for AudioSource
impl From<AudioSourceConfig> for AudioSource
source§fn from(config: AudioSourceConfig) -> Self
fn from(config: AudioSourceConfig) -> Self
Converts to this type from the input type.
source§impl Prefab for AudioSourceConfig
impl Prefab for AudioSourceConfig
fn from_prefab(data: &Value) -> Result<Self, PrefabError>
fn from_prefab_with_extras( data: &Value, _named_entities: &HashMap<String, Entity, RandomState>, _state_token: ID<PhantomData<dyn State + Sync + Send>> ) -> Result<Self, PrefabError>
fn to_prefab(&self) -> Result<Value, PrefabError>
fn from_prefab_str(data: &str) -> Result<Self, PrefabError>
fn to_prefab_string(&self) -> Result<String, PrefabError>
fn post_from_prefab(&mut self)
source§impl PrefabProxy<AudioSourceConfig> for AudioSource
impl PrefabProxy<AudioSourceConfig> for AudioSource
fn from_proxy_with_extras( proxy: AudioSourcePrefabProxy, _: &HashMap<String, Entity>, _: StateToken ) -> Result<Self, PrefabError>
Auto Trait Implementations§
impl RefUnwindSafe for AudioSourceConfig
impl Send for AudioSourceConfig
impl Sync for AudioSourceConfig
impl Unpin for AudioSourceConfig
impl UnwindSafe for AudioSourceConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more