pub trait AsComplex<T> {
type Complex<A>;
// Required method
fn as_complex(&self, real: bool) -> Self::Complex<T>;
// Provided methods
fn as_re(&self) -> Self::Complex<T> { ... }
fn as_im(&self) -> Self::Complex<T> { ... }
}Expand description
AsComplex defines an interface for converting a reference of some numerical type into a
complex number.
Required Associated Types§
Required Methods§
Sourcefn as_complex(&self, real: bool) -> Self::Complex<T>
fn as_complex(&self, real: bool) -> Self::Complex<T>
converts the current state into a complex number as either the real or imaginary part,
depending on the real flag
Provided Methods§
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.