---
title: "Discussion on \"Traits: The \"Contract\" System\" | Hashnode"
description: "Discussion on \"Traits: The \"Contract\" System\". ABSTRACT: 🧩 Analogy for Frontend Developers\nA Trait in Rust is exactly like an interface in TypeScript. \nThink of a Trait as a Contract or a Job Description. It is a way to define shared behavior in an abstract way, forcing different types of data t..."
url: "https://hashnode.com/posts/traits-the-contract-system/69d4e01da565305bb4c0aa8f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Traits: The "Contract" System](https://yafi.hashnode.dev/traits-the-contract-system?utm_source=hashnode&utm_medium=feed)

ABSTRACT: 🧩 Analogy for Frontend Developers A Trait in Rust is exactly like an interface in TypeScript. Think of a Trait as a Contract or a Job Description. It is a way to define shared behavior in an abstract way, forcing different types of data t...

Apr 7 · 4 min read · yafi.hashnode.dev  
Read the article

-   [#rust](https://hashnode.com/tag/rust)
-   [#traits](https://hashnode.com/tag/traits)
-   [#interfaces](https://hashnode.com/tag/interfaces)
-   [#clone](https://hashnode.com/tag/clone)
-   [#display](https://hashnode.com/tag/display)

## Written by

[Muhammad Yafi Alhakim](https://hashnode.com/@yafialhakim)

@yafialhakim · Jakarta, Indonesia

  
[View profile](https://hashnode.com/@yafialhakim)

Frontend Engineer @MySkill.id

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
