pub struct Generator(_);
Expand description
Represents the generator “base class”. A From impl lets you get to this object from any kind of generator.
Implementations
sourceimpl Generator
impl Generator
pub fn handle(&self) -> &Handle
pub fn into_handle(self) -> Handle
pub fn get_type(&self) -> Result<ObjectType>
sourcepub fn cast_to<T: CastTarget>(&self) -> Result<Option<T>>
pub fn cast_to<T: CastTarget>(&self) -> Result<Option<T>>
Try to cast this object to another object type. Will return
Ok(None)
if this is because of a type mismatch, otherwise Err
.
Clones self
on success in order to prevent throwing the object
away on error.
pub fn get_userdata(&self) -> Result<Option<Arc<dyn Any + Send + Sync>>>
pub fn set_userdata(
&self,
userdata: Option<impl Any + Send + Sync>
) -> Result<()>
pub fn config_delete_behavior(
&self,
config: &DeleteBehaviorConfig
) -> Result<()>
pub fn current_time(&self) -> DoubleProperty<'_>
pub fn suggested_automation_time(&self) -> DoubleProperty<'_>
pub fn pause(&self) -> Result<()>
pub fn play(&self) -> Result<()>
pub fn pitch_bend(&self) -> DoubleProperty<'_>
pub fn gain(&self) -> DoubleProperty<'_>
Trait Implementations
sourceimpl From<&'_ BufferGenerator> for Generator
impl From<&'_ BufferGenerator> for Generator
sourcefn from(other: &BufferGenerator) -> Generator
fn from(other: &BufferGenerator) -> Generator
Performs the conversion.
sourceimpl From<&'_ NoiseGenerator> for Generator
impl From<&'_ NoiseGenerator> for Generator
sourcefn from(other: &NoiseGenerator) -> Generator
fn from(other: &NoiseGenerator) -> Generator
Performs the conversion.
sourceimpl From<&'_ StreamingGenerator> for Generator
impl From<&'_ StreamingGenerator> for Generator
sourcefn from(other: &StreamingGenerator) -> Generator
fn from(other: &StreamingGenerator) -> Generator
Performs the conversion.
sourceimpl From<BufferGenerator> for Generator
impl From<BufferGenerator> for Generator
sourcefn from(input: BufferGenerator) -> Generator
fn from(input: BufferGenerator) -> Generator
Performs the conversion.
sourceimpl From<NoiseGenerator> for Generator
impl From<NoiseGenerator> for Generator
sourcefn from(input: NoiseGenerator) -> Generator
fn from(input: NoiseGenerator) -> Generator
Performs the conversion.
sourceimpl From<StreamingGenerator> for Generator
impl From<StreamingGenerator> for Generator
sourcefn from(input: StreamingGenerator) -> Generator
fn from(input: StreamingGenerator) -> Generator
Performs the conversion.
sourceimpl Ord for Generator
impl Ord for Generator
sourceimpl PartialOrd<Generator> for Generator
impl PartialOrd<Generator> for Generator
sourcefn partial_cmp(&self, other: &Generator) -> Option<Ordering>
fn partial_cmp(&self, other: &Generator) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl TryFrom<&'_ Generator> for BufferGenerator
impl TryFrom<&'_ Generator> for BufferGenerator
sourceimpl TryFrom<&'_ Generator> for NoiseGenerator
impl TryFrom<&'_ Generator> for NoiseGenerator
sourceimpl TryFrom<&'_ Generator> for StreamingGenerator
impl TryFrom<&'_ Generator> for StreamingGenerator
sourceimpl TryFrom<&'_ Generator> for FastSineBankGenerator
impl TryFrom<&'_ Generator> for FastSineBankGenerator
impl Eq for Generator
impl StructuralEq for Generator
impl StructuralPartialEq for Generator
Auto Trait Implementations
impl RefUnwindSafe for Generator
impl Send for Generator
impl Sync for Generator
impl Unpin for Generator
impl UnwindSafe for Generator
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more