A

Admin • 828.03K Points
Coach

Q. Which keyword is used to define a generic function in Rust?

  • (A) generic
  • (B) fn<T>
  • (C) template
  • (D) typename
  • Correct Answer - Option(B)
  • Views: 18
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin
Rust uses angle brackets with `fn` to define generics, like `fn<T>`.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.