Trait FromSample
pub trait FromSample<S> {
// Required method
fn from_sample_(s: S) -> Self;
}
Available on crate feature
dep_rodio
only.Expand description
Similar to the std From
trait, but specifically for converting between sample types.
We use this trait to be generic over the Sample::to_sample
and Sample::from_sample
methods.
Required Methods§
fn from_sample_(s: S) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.