pub trait GenNum<E: BaseNum>:
Copy
+ Sized
+ Clone
+ One
+ Zero
+ Div<Self, Output = Self>
+ Rem<Self, Output = Self>
+ Add<E, Output = Self>
+ Mul<E, Output = Self>
+ Rand {
// Required methods
fn from_s(x: E) -> Self;
fn map<F>(self, f: F) -> Self
where F: Fn(E) -> E;
fn zip<F>(self, y: Self, f: F) -> Self
where F: Fn(E, E) -> E;
fn split<F>(self, f: F) -> (Self, Self)
where F: Fn(E) -> (E, E);
fn map2<F>(self, y: Self, f: F) -> (Self, Self)
where F: Fn(E, E) -> (E, E);
}
Expand description
Generic numeric type.
Required Methods§
fn map<F>(self, f: F) -> Selfwhere
F: Fn(E) -> E,
fn zip<F>(self, y: Self, f: F) -> Selfwhere
F: Fn(E, E) -> E,
fn split<F>(self, f: F) -> (Self, Self)
fn map2<F>(self, y: Self, f: F) -> (Self, Self)
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.