Struct oddio::Handle [−][src]
Handle for manipulating a signal owned elsewhere
Handle types are typically verbose. Consider using type aliases or newtypes as shorthand for those that arise commonly in your application.
Implementations
impl<T: ?Sized> Handle<T>
[src]
pub unsafe fn from_arc(signal: Arc<T>) -> Self
[src]
Construct a handle enclosing signal
Used to implement signals like Mixer
.
Safety
There must never be more than one other Arc
referencing the same T
.
pub fn control<'a, S, Index>(&'a mut self) -> S::Control where
T: FilterHaving<S, Index>,
S: Controlled<'a>,
[src]
T: FilterHaving<S, Index>,
S: Controlled<'a>,
Get the control for Controlled
signal S
in a chain of signals
Index
can usually be inferred.
Example
fn quiet(signal: &mut Handle<Spatial<Gain<FramesSignal<Sample>>>>) { signal.control::<Gain<_>, _>().set_gain(0.5); }
Trait Implementations
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for Handle<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T: ?Sized> Unpin for Handle<T>
[src]
impl<T: ?Sized> UnwindSafe for Handle<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,