Roland Kuhn

Results 151 comments of Roland Kuhn
trafficstars

What would be the difference between `#[derive(OutEvent)]` and `#[derive(derive_more::From)]`?

That proposal covers all aspects but one — and I’m not certain that it is an important one so it might be fine: `impl From` can only distinguish based on...

@tomaka Hmm, that’s unfortunate. Maybe AsyncRead/Write are not the right abstraction, then? The errors we need to signal are upgrade errors, not I/O errors. @nazar-pc `thiserror` produces `std::error::Error`, which has...

My use-case is the following: ```rust let error = dial_error.to_string(); // ... logging etc. if matches!(dial_error, DialError::Transport(_)); && retries > 0 && error.contains("Other(A(B(Apply(Io(Kind(InvalidData))))))") { // TCP simultaneous open leads to...

So what would be the optimal solution in the scenario I’m asking about?

FTR: with some hints from [other people](https://internals.rust-lang.org/t/option-to-turn-debug-into-no-op/17587/11) I was able to avoid string matching, see https://github.com/ipfs-rust/ipfs-embed/blob/a959d5f93fdc0f2319fabea4868bd62d46625828/src/net/peers.rs#L878-L902

The term “swarm” is getting more and more established for peer-to-peer networks, even outside non-technical communities (it is used for example by the EU commission). When naming an API, my...

Given the current structure, it would be more consistent if the generated implementation would be extended to call the provided associated function. This way sub-behaviours keep working as they were...

Yes, @elenaf9 that is going in the direction I’ve been pondering since opening this issue. What I’d like to have is the ability to compose behaviours as mostly black boxes ...

Sunday morning, cold and bright weather, out in the countryside, taking a walk … and I finally understood: - NetworkBehaviour operates on the level of a peer, it defines what...