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
{{ message }}
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.
(ignoring how the inject/extract to/from are expressed).
We'd want to write Instrument as the generic rather than I since that's common swift style to use full words.
But we today use Instrument for the wrapper type:
What would be a better naming strategy for this type:
/// A box-type for an `InstrumentProtocol`, necessary for creating homogeneous collections of `InstrumentProtocol`s.publicstructInstrument<InjectInto,ExtractFrom>:InstrumentProtocol{privateletinject:(BaggageContext,inoutInjectInto)->Voidprivateletextract:(ExtractFrom,inoutBaggageContext)->Void/// Wrap the given `InstrumentProtocol` inside an `Instrument`./// - Parameter instrument: The `InstrumentProtocol` being wrapped.publicinit<I>(_ instrument:I)where
I:InstrumentProtocol,
I.InjectInto ==InjectInto,
I.ExtractFrom ==ExtractFrom{
TracingInstrument does come to mind, but these ones are not specifically tracing, they are generic.
Having looked at this again I guess this should be AnyInstrument and the protocol can become InstrumentProtocol (OR BaggageInstrument)... WDYT?
The text was updated successfully, but these errors were encountered:
Having looked at this again I guess this should be AnyInstrument and the protocol can become InstrumentProtocol
Agreed. Calling the generic type argument I felt like a necessary workaround rather than a good solution. I think AnyInstrument more clearly communicates the intent 👍 I'd prefer Instrument for the protocol, but then we'd have to use I or something similar again, so I guess calling it InstrumentProtocol is worth the trade-off.
(ignoring how the inject/extract to/from are expressed).
We'd want to write Instrument as the generic rather than
I
since that's common swift style to use full words.But we today use Instrument for the wrapper type:
What would be a better naming strategy for this type:
TracingInstrument
does come to mind, but these ones are not specifically tracing, they are generic.Having looked at this again I guess this should be
AnyInstrument
and the protocol can becomeInstrumentProtocol
(ORBaggageInstrument
)... WDYT?The text was updated successfully, but these errors were encountered: