Conceptual
Login

Traits in Rust

A trait declares a set of methods or a marker property that types implement, enabling bounded generics resolved at compile time via monomorphization. Traits are Rust's sole interface mechanism; there is no class inheritance.

Questions this Concept answers

  • Why can kernel code be written against a trait instead of against one specific driver type?