pub struct SoundBuilder { /* private fields */ }Expand description
Sound builder, allows you to create a new Sound instance.
Implementations§
Source§impl SoundBuilder
impl SoundBuilder
Sourcepub fn new(base_builder: BaseBuilder) -> Self
pub fn new(base_builder: BaseBuilder) -> Self
Creates new sound builder.
Sourcepub fn with_buffer(self, value: Option<SoundBufferResource>) -> Self
pub fn with_buffer(self, value: Option<SoundBufferResource>) -> Self
Sets desired buffer. See Sound::set_buffer for more info.
Sourcepub fn with_play_once(self, value: bool) -> Self
pub fn with_play_once(self, value: bool) -> Self
Sets play-once mode. See Sound::set_play_once for more info.
Sourcepub fn with_gain(self, value: f32) -> Self
pub fn with_gain(self, value: f32) -> Self
Sets desired gain. See Sound::set_gain for more info.
Sourcepub fn with_panning(self, value: f32) -> Self
pub fn with_panning(self, value: f32) -> Self
Sets desired panning. See Sound::set_panning for more info.
Sourcepub fn with_status(self, value: Status) -> Self
pub fn with_status(self, value: Status) -> Self
Sets desired status. See Sound::play, Sound::stop, Sound::stop for more info.
Sourcepub fn with_looping(self, value: bool) -> Self
pub fn with_looping(self, value: bool) -> Self
Sets desired looping. See Sound::set_looping for more info.
Sourcepub fn with_pitch(self, value: f64) -> Self
pub fn with_pitch(self, value: f64) -> Self
Sets desired pitch. See Sound::set_pitch for more info.
Sourcepub fn with_radius(self, value: f32) -> Self
pub fn with_radius(self, value: f32) -> Self
Sets desired radius. See Sound::set_radius for more info.
Sourcepub fn with_max_distance(self, value: f32) -> Self
pub fn with_max_distance(self, value: f32) -> Self
Sets desired max distance. See Sound::set_max_distance for more info.
Sourcepub fn with_rolloff_factor(self, value: f32) -> Self
pub fn with_rolloff_factor(self, value: f32) -> Self
Sets desired rolloff factor. See Sound::set_rolloff_factor for more info.
Sourcepub fn with_spatial_blend_factor(self, value: f32) -> Self
pub fn with_spatial_blend_factor(self, value: f32) -> Self
Sets desired spatial blend factor. See Sound::set_spatial_blend for more info.
Sourcepub fn with_playback_time(self, value: Duration) -> Self
pub fn with_playback_time(self, value: Duration) -> Self
Sets desired playback time. See Sound::set_playback_time for more info.
Sourcepub fn with_audio_bus(self, value: String) -> Self
pub fn with_audio_bus(self, value: String) -> Self
Sets desired playback time. See Sound::set_audio_bus for more info.
Sourcepub fn build_sound(self) -> Sound
pub fn build_sound(self) -> Sound
Creates a new Sound node.
Sourcepub fn build_node(self) -> Node
pub fn build_node(self) -> Node
Creates a new Sound node.
Auto Trait Implementations§
impl !Freeze for SoundBuilder
impl !RefUnwindSafe for SoundBuilder
impl Send for SoundBuilder
impl !Sync for SoundBuilder
impl Unpin for SoundBuilder
impl !UnwindSafe for SoundBuilder
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Any. Could be used to downcast a trait object
to a particular type.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Any. Could be used to downcast a trait object
to a particular type.fn into_any(self: Box<T>) -> Box<dyn Any>
Source§impl<T> FieldValue for Twhere
T: 'static,
impl<T> FieldValue for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.