-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rework
CastPtr
, CastConstPtr
, BoxCastPtr
, ArcCastPtr
This commit reworks the existing `CastPtr`, `CastConstPtr`, `BoxCastPtr`, and `ArcCastPtr` traits into a new `Castable` trait with an associated `CastType`, constrained to be a type implementing the new `CastTypeMarker` trait. Two implementations of this `CastTypeMarker` trait are offered: `BoxCastTypeMarker` and `ArcCastTypeMarker`. The net result is that the type system is now able to enforce our invariant that a single type can't be cast as both an immutable `Arc` over the underlying Rust type and a mutable `Box` over the underlying Rust type. Along the way crate-internal documentation for the traits and associated free-standing helper `fs`s were reworked for clarity/consistency.
- Loading branch information
Showing
6 changed files
with
350 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.