11 lines
242 B
Rust
11 lines
242 B
Rust
|
#[derive(Clone,Copy,Debug,Hash)]
|
||
|
pub struct Ratio<Num,Den>{
|
||
|
pub(crate)num:Num,
|
||
|
pub(crate)den:Den,
|
||
|
}
|
||
|
//this trait is like a constructor for Ratio
|
||
|
pub trait DeferredDiv<Rhs=Self>{
|
||
|
type Output;
|
||
|
fn deferred_div(self,rhs:Rhs)->Self::Output;
|
||
|
}
|