pub struct Generator(/* private fields */);Expand description
Represents the generator “base class”. A From impl lets you get to this object from any kind of generator.
Implementations§
Source§impl 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§
Source§impl From<&BufferGenerator> for Generator
impl From<&BufferGenerator> for Generator
Source§fn from(other: &BufferGenerator) -> Generator
fn from(other: &BufferGenerator) -> Generator
Converts to this type from the input type.
Source§impl From<&FastSineBankGenerator> for Generator
impl From<&FastSineBankGenerator> for Generator
Source§fn from(other: &FastSineBankGenerator) -> Generator
fn from(other: &FastSineBankGenerator) -> Generator
Converts to this type from the input type.
Source§impl From<&NoiseGenerator> for Generator
impl From<&NoiseGenerator> for Generator
Source§fn from(other: &NoiseGenerator) -> Generator
fn from(other: &NoiseGenerator) -> Generator
Converts to this type from the input type.
Source§impl From<&StreamingGenerator> for Generator
impl From<&StreamingGenerator> for Generator
Source§fn from(other: &StreamingGenerator) -> Generator
fn from(other: &StreamingGenerator) -> Generator
Converts to this type from the input type.
Source§impl From<BufferGenerator> for Generator
impl From<BufferGenerator> for Generator
Source§fn from(input: BufferGenerator) -> Generator
fn from(input: BufferGenerator) -> Generator
Converts to this type from the input type.
Source§impl From<FastSineBankGenerator> for Generator
impl From<FastSineBankGenerator> for Generator
Source§fn from(input: FastSineBankGenerator) -> Generator
fn from(input: FastSineBankGenerator) -> Generator
Converts to this type from the input type.
Source§impl From<NoiseGenerator> for Generator
impl From<NoiseGenerator> for Generator
Source§fn from(input: NoiseGenerator) -> Generator
fn from(input: NoiseGenerator) -> Generator
Converts to this type from the input type.
Source§impl From<StreamingGenerator> for Generator
impl From<StreamingGenerator> for Generator
Source§fn from(input: StreamingGenerator) -> Generator
fn from(input: StreamingGenerator) -> Generator
Converts to this type from the input type.
Source§impl Ord for Generator
impl Ord for Generator
Source§impl PartialOrd for Generator
impl PartialOrd for Generator
Source§impl TryFrom<&Generator> for BufferGenerator
impl TryFrom<&Generator> for BufferGenerator
Source§impl TryFrom<&Generator> for FastSineBankGenerator
impl TryFrom<&Generator> for FastSineBankGenerator
Source§impl TryFrom<&Generator> for NoiseGenerator
impl TryFrom<&Generator> for NoiseGenerator
Source§impl TryFrom<&Generator> for StreamingGenerator
impl TryFrom<&Generator> for StreamingGenerator
Source§impl TryFrom<Generator> for BufferGenerator
impl TryFrom<Generator> for BufferGenerator
Source§impl TryFrom<Generator> for FastSineBankGenerator
impl TryFrom<Generator> for FastSineBankGenerator
Source§impl TryFrom<Generator> for NoiseGenerator
impl TryFrom<Generator> for NoiseGenerator
Source§impl TryFrom<Generator> for StreamingGenerator
impl TryFrom<Generator> for StreamingGenerator
impl Eq for Generator
impl StructuralPartialEq for Generator
Auto Trait Implementations§
impl Freeze for Generator
impl RefUnwindSafe for Generator
impl Send for Generator
impl Sync for Generator
impl Unpin for Generator
impl UnwindSafe for Generator
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