programming:rust

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
programming:rust [2020/12/13 18:26] – [Traits] mhprogramming:rust [2020/12/13 19:48] – [Traits] mh
Line 512: Line 512:
 === Traits as Parameters === === Traits as Parameters ===
  
-Traits can be used to define functions that accept many different types who all implement a certain trait. The function is defined using that trait as a parameter, instead of concrete types.+Traits can be used to define functions that accept many different types who all implement a certain trait. The function is defined using that trait as a parameter, instead of concrete types. [[https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters|Check here]] for more info. 
 + 
 +=== Blanket implementations === 
 + 
 +They are extensively used in the Rust Standard librarby and allow implementing a trait for any type that implements another trait. [[https://doc.rust-lang.org/book/ch10-02-traits.html#using-trait-bounds-to-conditionally-implement-methods|More info]] 
 + 
 +==== Lifetimes ====
 ===== Misc ===== ===== Misc =====
  
  • programming/rust.txt
  • Last modified: 2021/05/25 22:07
  • by mh