I am trying to implement my own version of Complex (purely for my own knowledge). I am trying to have the division operation implemented. But I am having trouble comparing the denominator with 0 value of corresponding type. How do I do that? Basically if the division is by 0 I want to return my own error.

I mean, the zero value of i_ is 0 (where _ is 8, 32, 64 etc) and the zero value of f_ is 0.0 (_ is 32 or 64). Also my below implementation does not stop me from using &str as a type. How can I restrict the Complex to be only of numeric type?

```
#[derive(Debug)]
pub struct Complex<T> {
re: T,
im: T,
}
impl<T> Complex<T>
where
T: Sized + Copy,
{
pub fn new(re: T, im: T) -> Self {
Self { re, im }
}
}
impl<T> Div for Complex<T>
where
T: Sized + Copy + Div<Output = T>,
{
type Output = Result<Complex<T>, String>;
fn div(self, rhs: Complex<T>) -> Self::Output {
Ok(Self {
re: self.re / rhs.re,
im: self.im / rhs.im,
})
}
}
```