Open
Description
qmetaobject-rs/qmetaobject/src/connections.rs
Line 162 in 5d1f561
If this trait would be sealed, it would become impossible to implement by outsiders. It will also make the documentation line "You should not implement this trait" redundant, and enforce such restriction on a type level.
Steps to fix:
- Define private module
seal
insideconnections
- Define bare
pub trait Seal
there - Re-declare
Slot
asSlot: seal::Seal
- Implement
seal::Seal
for all relevant types insideconnections
module
Sample implementation of sealed pattern: https://github.com/ratijas/windows-rust-counters/blob/f03c769242f2c6b4d990155245aebf9a8cfc4a8c/signal-flow/src/interval.rs#L32-L40