odilia-app / atspi

A fast, zbus-based, permissively licensed AT-SPI library written in pure Rust!
Apache License 2.0
32 stars 6 forks source link

Big Trait Changes #206

Open TTWNO opened 4 months ago

TTWNO commented 4 months ago

Summary

Split BusProperties into the const &'static strs (still called BusProperties), and message conversion: MessageConversion (TODO: name).

All trivial events (where they contain only the field item) now implement From<ObjectRef>.

All events that implement From<ObjectRef> get their MessageConversion implementation for free (blanket impl).

Rename:

An additional check was added to all implementations of From<&zbus::Message> (the macro) requireing that the body signature match the event's body signature—this supplements the xisitng checks on the interface and member.

Commits

TODO

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 94.87603% with 31 lines in your changes missing coverage. Please review.

Project coverage is 84.67%. Comparing base (bfa3bc4) to head (cb70e23).

Files Patch % Lines
atspi-common/src/events/cache.rs 84.54% 17 Missing :warning:
atspi-common/src/events/mod.rs 91.97% 11 Missing :warning:
atspi-common/src/error.rs 0.00% 2 Missing :warning:
atspi-connection/src/lib.rs 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #206 +/- ## ========================================== - Coverage 87.23% 84.67% -2.56% ========================================== Files 42 43 +1 Lines 3595 3223 -372 ========================================== - Hits 3136 2729 -407 - Misses 459 494 +35 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

TTWNO commented 4 months ago

Shout out to our extensive tests that caught a ton of the mistakes I was making along the way! I would have forgot to add the signature check if we didn't have a test specifically that matched the interface+member but gave a blank body.

TTWNO commented 4 months ago

Rebased on main.