You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "zeodtr (via GitHub)" <gi...@apache.org> on 2023/10/04 05:03:48 UTC
[I] Implement Debug trait for public structs [iceberg-rust]
zeodtr opened a new issue, #73:
URL: https://github.com/apache/iceberg-rust/issues/73
It's useful to implement `Debug` trait for public `struct`s.
The Rust document strongly recommends it: https://doc.rust-lang.org/std/fmt/index.html#fmtdisplay-vs-fmtdebug
Also, there is a lint directive for it: https://doc.rust-lang.org/stable/nightly-rustc/rustc_lint/builtin/static.MISSING_DEBUG_IMPLEMENTATIONS.html
Maybe it would be nice to include that lint directive as `deny` to `lib.rs`.
Also, can traits like `Catalog` be modified to be dependent upon `Debug` trait like this?
```rust
pub trait Catalog: Debug {
```
It would be convenient when including a `Box dyn`ed `trait` member to a `struct` that wants to implement `Debug` trait. Otherwise, since `Debug` trait is not an auto trait, we must create a new wrapper trait only to specify `Debug` trait dependency.
Also, (maybe this is somewhat irrelevant to this issue. If so, ignore this) it would be convenient if `Catalog` trait be modified to be dependent also upon `Send` and `Sync` like this:
```rust
pub trait Catalog: Debug + Send + Sync {
```
Since `Catalog` trait is an async trait, adding `Send` and `Sync` can be useful. (BTW, I've added them to a trait that wraps the `Catalog` trait to include `Debug` trait.)
Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] Implement `Debug` trait for public structs [iceberg-rust]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko closed issue #73: Implement `Debug` trait for public structs
URL: https://github.com/apache/iceberg-rust/issues/73
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [I] Implement `Debug` trait for public structs [iceberg-rust]
Posted by "liurenjie1024 (via GitHub)" <gi...@apache.org>.
liurenjie1024 commented on issue #73:
URL: https://github.com/apache/iceberg-rust/issues/73#issuecomment-1751595801
+1 for this proposal.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org