Trait IntoComplex

Source
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§

Source

fn into_complex(self, real: bool) -> Self::Complex<T>
where Self: Sized,

Provided Methods§

Source

fn into_re(self) -> Self::Complex<T>
where Self: Sized,

Source

fn into_im(self) -> Self::Complex<T>
where Self: Sized,

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.

Implementors§

Source§

impl<T> IntoComplex<T> for T
where T: Num,