pub trait FromSample<S> {
// Required method
fn from_sample_(s: S) -> Self;
}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.