trait name<T> {
        
      }

      Rust language logo
      trait

      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

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.