SymbolPool#createName() and in Rust I've a static method
SymbolPool::create_name(), where the
self parameter has turned into a
Rc, consequently making the method static.
I need to do
symbol.set_pool(self) in my factory, but actually the
Symbol#set_pool() method is going to take a
I think that one workaround could be to store a
_self_reference: Weak<SymbolPool> field in
SymbolPool. However, the symbol factory methods are not the only issue. I had also to move some methods from
SymbolPool, just to take a
Rc (and not cluster the
Symbol trait with static methods, since
Rc<dyn Symbol> is used in the code).
I think that allowing self parameter as a Rc would benefit this (pre-RFC).