Comments (2)
Yeah, I like the idea of the associated type. I was planning on making a macro to implement the ApiRequest
trait, since a large portion of it is just boiler plate. Since I was pretty consistent with the type naming, I think it might be possible to make a macro where you just pass in the request name, and it would automatically link the response as an associated type. I think a combination of the associated type, and the macro would make it really difficult to ever make a naming issue.
Also I'm okay with making path an associated const. I didn't know about associated consts, but the path method is pretty much acting like one right now.
from rust-ipfs-api.
I think it might be possible to make a macro where you just pass in the request name, and it would automatically link the response as an associated type
Let me know if you work this out, but afaik synthesizing new identifiers in macros is not currently feasible... :-(
from rust-ipfs-api.
Related Issues (20)
- When I use documents and examples, I find it can't help me HOT 2
- File Seeks With client.cat HOT 7
- Connection fails with rustls HOT 1
- repo gc HOT 1
- `dag_get` does not decode gracefully
- `object_links` fails for objects with no links
- `get` vs `cat`, `get` possibly returns TAR
- Question - What's the Maintenance / Deprecation Status? HOT 7
- Invalid byte while expecting start of value: 0xa3
- The `/api/v0/swarm/connect` command is not implemented
- Dependency error on cargo doc / cargo run HOT 1
- cat with a timeout can truncate responses
- HTTPError: file argument'value-file' is required
- Override endpoint using environmental variable or local file
- Connection Pooling is Disabled by Default for the Hyper Implementation
- Latest kubo Removes ProtocolVersion Field in id Response
- Error when running "cargo build --all"
- Futures are not Send HOT 3
- go-ipfs v0.11
- type inside `async` block must be known in this context HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-ipfs-api.