pub trait IntoComplex<T> {
type Complex<A>;
// Required method
fn into_complex(self, real: bool) -> Self::Complex<T>
where Self: Sized;
// Provided methods
fn into_re(self) -> Self::Complex<T>
where Self: Sized { ... }
fn into_im(self) -> Self::Complex<T>
where Self: Sized { ... }
}Expand description
Trait for converting a type into a complex number.
Required Associated Types§
Required Methods§
Sourcefn into_complex(self, real: bool) -> Self::Complex<T>where
Self: Sized,
fn into_complex(self, real: bool) -> Self::Complex<T>where
Self: Sized,
converts the current state into a complex number used either as 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.