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

Id traits #41

Merged
merged 12 commits into from
Oct 28, 2021
Merged

Id traits #41

merged 12 commits into from
Oct 28, 2021

Conversation

madsmtm
Copy link
Owner

@madsmtm madsmtm commented Oct 5, 2021

Strive to implement the traits that Box and Arc does.

Additionally, for the traits that return Self (like From and Default), add additional traits that can help with that functionality in downstream crates (like objc2_foundation). Should solve #39 as far as possible.

Add additional helper trait DefaultId for implementing Default on Id in downstream crates. Part of #39, the rest has been postponed

  • Add Error impl for Id.
  • Fix UnwindSafe impls.
  • Re-add IdSlice trait.
  • Impl Hasher
  • Impl io traits
  • Impl Future
  • Add DefaultId
  • Add FromId / IntoId Postponed
  • Add TryFromId / TryIntoId Postponed

@madsmtm madsmtm added enhancement New feature or request bug Something isn't working labels Oct 5, 2021
madsmtm and others added 3 commits October 5, 2021 18:16
Previously UnwindSafe required `RefUnwindSafe + UnwindSafe`, but this is unnecessarily restrictive.

And WeakId was !RefUnwindSafe
Removed previously in 4118e96, but embedded drop flags are gone so this is no longer an issue.

Fixes SSheldon/rust-objc-id#1

Co-authored-by: Steven Sheldon <[email protected]>
@madsmtm madsmtm merged commit 4dd5852 into master Oct 28, 2021
@madsmtm madsmtm deleted the id-traits branch October 28, 2021 21:08
This was referenced Oct 28, 2021
@madsmtm madsmtm added this to the objc2 v0.3 milestone Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant