add reflect for BinaryHeap (#12503)
# Objective I wanted to have reflection for BinaryHeap for a personal project. I'm running into some issues: - I wanted to represent BinaryHeap as a reflect::List type since it's essentially a wrapper around a Vec, however there's no public way to access the underlying Vec, which makes it hard to implement the reflect::List methods. I have omitted the reflect::List methods for now.. I'm not sure if that's a blocker? - what would be the alternatives? Simply not implement `reflect::List`? It is possible to implement `FromReflect` without it. Would the type be `Struct` then? --------- Co-authored-by: Charles Bournhonesque <cbournhonesque@snapchat.com>
This commit is contained in:
parent
5d0ff60a6b
commit
ea6540dc41
@ -219,6 +219,7 @@ impl_reflect_value!(::std::ffi::OsString(
|
||||
));
|
||||
#[cfg(not(any(unix, windows)))]
|
||||
impl_reflect_value!(::std::ffi::OsString(Debug, Hash, PartialEq));
|
||||
impl_reflect_value!(::alloc::collections::BinaryHeap<T: Clone>);
|
||||
|
||||
macro_rules! impl_reflect_for_veclike {
|
||||
($ty:path, $insert:expr, $remove:expr, $push:expr, $pop:expr, $sub:ty) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user