Mingun

Results 397 comments of Mingun

I think it is better to fix this generically, not just for the case with one flattened field, because in that case it creates a friction when users realising that...

Probably https://users.rust-lang.org/t/how-to-end-borrow-in-this-code/72719/3?u=mingun can give you an answer: > ... > ```rust > // `&'static [u8]` in particular implements > // `for` > impl for &'long [u8] { > fn read(&mut...

You can implement [`DeserializeSeed`](https://docs.serde.rs/serde/de/trait.DeserializeSeed.html) for your `Context` -- this will allow you to deserialize top-level `SomeData` struct, but unfortunately, this approach is not composable

> But it could not be done if object tree is complex, right? Yes, at least with serde's derives. Probably the more realistic approach is to deserialize into intermediate stateless...

There is not such attribute. I think it would be useless mostly. You can try to utilize an [`expecting`](https://github.com/serde-rs/serde/pull/1916) attribute to override default serde error message: ```rust #[derive(Deserialize, Debug)] #[serde(deny_unknown_fields)]...

Container attributes `transparent`, `from` and `into` are also undocumented https://github.com/serde-rs/serde/blob/06dcbbbaba71ec15dc89162b5bc7177e4405ac9e/serde_derive/src/internals/attr.rs#L233-L236 https://github.com/serde-rs/serde/blob/06dcbbbaba71ec15dc89162b5bc7177e4405ac9e/serde_derive/src/internals/attr.rs#L332-L344

> С тем, чтобы рисовать их автоматически, возможно, есть еще одна проблема: в каком-нибудь доказательстве от противного может возникнуть необходимость обозначить как прямые два угла, которые одновременно не могут быть...

Круто. Закройте сами задачу, когда решите, что более ничего улучшать не будите -- мне сложно об этом судить.

The discussion about possible changes was so long ago that I completely forgot about this solution. Anyway, implementing completely new solution requires a bit more time and this change is...

No, this branch is intentionally based on the #222 branch. Not checked yet that project is in a buildable state after each commit after rebase, so converted to draft.