-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
ATM CustomType::get_type_def
requires passing in the Arc<Extension>
from CustomType::get_extension
so that the caller keeps the Arc (upgraded from the Weak<Extension>
in the typedef) alive. This is annoying for callers, and the Weak<Extension>
means the Extension + TypeDefs could be collected while the CustomType remains live.
Since there is no link from the TypeDef to CustomType instances thereof, we could instead
- Give CustomType an
Arc<TypeDef>
(but no direct link to the extension. The TypeDef has aWeak<Extension>
which should be enough if really necessary. - This requires changing
Extension
to storeArc<TypeDef>
rather thanTypeDef
directly - Drop
CustomType::get_extension
; remove parameters fromCustomType::get_type_def
I think this is non-breaking (the CustomType
methods are crate-private), might reconsider if this changes.
Metadata
Metadata
Assignees
Labels
No labels