Advertisement
cwchen

[Rust] Vector class

Sep 14th, 2017
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.17 KB | None | 0 0
  1. // For a trait of general number
  2. extern crate num;
  3.  
  4. use std::fmt;
  5. use std::ops::Add;
  6.  
  7. pub struct Vector<T> where T: Copy + fmt::Display + num::Num {
  8.      vec: Vec<T>,
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement