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: boolImplementations§
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 duplicate of the value. Read more
1.0.0 (const: unstable) · 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>, _state_token: ID<PhantomData<dyn State + Send + Sync>>, ) -> 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 Freeze for AudioSourceConfig
impl RefUnwindSafe for AudioSourceConfig
impl Send for AudioSourceConfig
impl Sync for AudioSourceConfig
impl Unpin for AudioSourceConfig
impl UnsafeUnpin 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