How to replicate inheritance (kinda) in Rust?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • rust

    Empowering everyone to build reliable and efficient software.

  • Maybe you can look into splitting your Node trait into NodeClone for copy() and NodeEval for eval()? If you are on nightly you can even use trait_alias to get back trait Node = NodeClone + NodeEval;.

  • syn

    Parser for Rust source code

  • It looks to me like you are trying to make a syntax tree generic over arities. I suggest you take a look at the Expr enum in syn, its variant structs, and the ast_enum_of_structs_impl macro, which is a macro that implements a trait over different Expr variants with different fields.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • I wrote a library to expand byte string literals for pattern matching

    2 projects | /r/rust | 4 Feb 2023
  • Create a Custom GitHub Action in Rust

    3 projects | dev.to | 28 Apr 2024
  • I hate Rust (programming language)

    1 project | news.ycombinator.com | 22 Apr 2024
  • Rust Weird Exprs

    1 project | news.ycombinator.com | 11 Apr 2024
  • Critical safety flaw found in Rust on Windows (CVE-2024-24576)

    1 project | news.ycombinator.com | 10 Apr 2024