Trait AsComplex

Source
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> { ... }
}

Required Associated Types§

Required Methods§

Source

fn as_complex(&self, real: bool) -> Self::Complex<T>

Provided Methods§

Source

fn as_re(&self) -> Self::Complex<T>

Source

fn as_im(&self) -> Self::Complex<T>

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> AsComplex<T> for T
where T: Clone + Num,