Jay [MOVED HERE] on Nostr: If you imagine a struct as a collection of information (structured data), impl ...
If you imagine a struct as a collection of information (structured data), impl (implementations) let you define some functionality around that data so you can use or transform it.
Then traits are predefined sets of functionality, but you can define the implementation based on whats in your struct.
Published at
2025-02-15 02:56:52Event JSON
{
"id": "be8c91d83e5d96398a71c59cdc76432f5ccc5b35caa87dd484c61bbb0993044f",
"pubkey": "7ed7d5c3abf06fa1c00f71f879856769f46ac92354c129b3ed5562506927e200",
"created_at": 1739588212,
"kind": 1,
"tags": [
[
"e",
"c7e03849b3ba8a2e0ad87d1d136c3fd04ee9bf96fad38b34b684b7844a2e465b",
"",
"root"
],
[
"p",
"bf41becc8831e7315d9a99f83f11690999605fbb59474234f091a61613dc5991"
]
],
"content": "If you imagine a struct as a collection of information (structured data), impl (implementations) let you define some functionality around that data so you can use or transform it.\n\nThen traits are predefined sets of functionality, but you can define the implementation based on whats in your struct. ",
"sig": "f2b21c25a4137dddfe0a9719a9cb0d842ac05f1defa6ea9797c7fd1f57fef29a0c7f7c60b9808640c5ff76128b247dd72be3c19d9a20669d89875767acdca44f"
}