Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an intermediate DowncastSend that DowncastSync extends. #23

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

marcianx
Copy link
Owner

@marcianx marcianx commented Jan 7, 2025

DowncastSend and DowncastSync provide methods to upcast to Box<Trait + Send> and Box<Trait + Send + Sync>, respectively.

The addition of a new DowncastSend trait that DowncastSync depends on is probably backward-compatible since no-one else should be able timplement DowncastSync due to object-safety rules. But we need to switch to a new major version anyway. So taking advantage of that here to not worry about backward-compatibility edge cases.

Fixes #14.

`DowncastSend` and `DowncastSync` provide methods to upcast to `Box<Trait + Send>` and `Box<Trait + Send + Sync>`, respectively.

The addition of a new `DowncastSend` trait that `DowncastSync` depends on is probably backward-compatible since no-one else should be able timplement `DowncastSync` due to object-safety rules. But we need to switch to a new major version anyway. So taking advantage of that here to not worry about backward-compatibility edge cases.

Fixes #14.
@marcianx marcianx merged commit 7e801af into master Jan 7, 2025
2 checks passed
@marcianx marcianx deleted the send branch January 7, 2025 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downcast for just Send?
1 participant