You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some instances it might be nice to have a Clone implementation for ConnectOptions.
Proposed Change:
Right now it seems possible, only the event_callback: CallbackArg1 member is an issue.
Who Benefits From The Change(s)?
In instances where the user of the crate uses a framework that does configuration construction in one step, and a later step is responsible for the connect() call.
If the user only has a nonmutable reference to the constructed ConnectOptions instance in that moment, they have to use some Arc/Mutex trickery to make their code work.
Alternative Approaches
Arc/Mutex trickery or "manual cloning" of a ConnectOptions instance.
The text was updated successfully, but these errors were encountered:
Use Case:
In some instances it might be nice to have a
Clone
implementation forConnectOptions
.Proposed Change:
Right now it seems possible, only the
event_callback: CallbackArg1
member is an issue.Who Benefits From The Change(s)?
In instances where the user of the crate uses a framework that does configuration construction in one step, and a later step is responsible for the
connect()
call.If the user only has a nonmutable reference to the constructed
ConnectOptions
instance in that moment, they have to use some Arc/Mutex trickery to make their code work.Alternative Approaches
Arc/Mutex trickery or "manual cloning" of a
ConnectOptions
instance.The text was updated successfully, but these errors were encountered: