rust-delegate
Rust method delegation with less boilerplate (by Kobzol)
rust-delegate | storages-api | |
---|---|---|
8 | 5 | |
422 | 9 | |
- | - | |
6.7 | 0.0 | |
5 months ago | 9 months ago | |
Rust | Rust | |
Apache License 2.0 | - |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rust-delegate
Posts with mentions or reviews of rust-delegate.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-08.
-
On inheritance and why it's good Rust doesn't have it
Ah, that answers the first question, as to how inheritance is superior to manual delegation. By the way, this crate seems to do a good job of supporting delegation: https://crates.io/crates/delegate. I have nothing against this in principle.
-
Fellow Rust enthusiasts: What "sucks" about Rust?
This is certainly one that's bugged me too. There's the delegate crate which helps, but is still a decent amount of boilerplate due to macro limitations
- Enum variants share Trait while Parent does not - A Better solution?
-
Hey Rustaceans! Got a question? Ask here! (44/2022)!
As u/onomatopeiaddx said, it isn't possible since macros only have access to the token tree it is given. I don't see why a newtype wouldn't work tho. and to help with newtypes you may want to have a look at the delegate crate
-
The Rust RFC process does not seem as amazing as I initially thought
Macros, probably. For example this one, that was already made by someone else, published on crates.io and is actively maintained. If the feature is already possible in rust, but requires a lot of boilerplate, then macros are the answer 99% of the time.
-
Inheritance to composition
delegate crate would reduce some boilerplate.
- Is there a way to append to struct in Rust?
storages-api
Posts with mentions or reviews of storages-api.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-05-04.
-
What’s the status of the Storage proposal?
I think here you can find the new repository as there are commits from yesterday. Also this is probably the most recent discussion about the proposal.
-
Fellow Rust enthusiasts: What "sucks" about Rust?
I believe SSO could be solved, in part, with the Storage proposal I made a while ago, which Christopher Duram refined in his storages-api repository.
-
Taking ownership of memory, how straightforward is it?
/u/CAD97 is currently exploring whether storages would be a better alternative: feasibility, API impacts, etc... for example see https://github.com/CAD97/storages-api for a much revised API compared to my initial proposal.
-
Specialized Allocators for containers
This sounds like a less refined version of the storages API: https://github.com/CAD97/storages-api
-
The Better Alternative to Lifetime GATs
The unfortunate asterisk to this is my work on the Storage api; with that abstraction Vec itself could be the small vector type rather than duplicating the entire API onto a second type.
What are some alternatives?
When comparing rust-delegate and storages-api you can also consider the following projects:
born - Remove code duplication from Struct and Enum with functional macros.
tinyvec - Just, really the littlest Vec you could need. So smol.
dislike-in-rust - A list of the few things I don't like about rust
pollster - A minimal async executor that lets you block on a future
getrandom - A small cross-platform library for retrieving random data from (operating) system source
storage - An exploration of Storages
compiler-team - A home for compiler team planning documents, meeting minutes, and other such things.
any_vec - Rust type erased vector.
SHLL - An experiment of high level code optimization
unsafe-code-guidelines - Forum for discussion about what unsafe code can and can't do
rust-delegate vs born
storages-api vs tinyvec
rust-delegate vs dislike-in-rust
storages-api vs dislike-in-rust
rust-delegate vs pollster
storages-api vs pollster
rust-delegate vs getrandom
storages-api vs storage
rust-delegate vs compiler-team
storages-api vs any_vec
rust-delegate vs SHLL
storages-api vs unsafe-code-guidelines