mirror of https://github.com/sunface/rust-course
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sunface
ac69dc1cbd
|
3 years ago | |
---|---|---|
.. | ||
README.md | 3 years ago | |
generics1.rs | 3 years ago | |
generics2.rs | 3 years ago | |
generics3.rs | 3 years ago |
README.md
泛型
泛型的主旨是把类型和函数泛化到多种情况。 这在很多方面有助于减少重复代码,但也可能需要为此使用相当多的语法。 也就是说,使用泛型的话则需要小心谨慎地标明泛型适用于哪些类型。