trait

    0

    1

    lucycodes42

    Rust snippets

    The following code defines a trait named name. This trait defines a single method named hello, which takes an instance of T as a parameter and prints "Hello, world!" to the console.

    Shortcut: trait

    trait name<T> {
      
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.