[Pitch] Deriving values of other non-escapable types from the span family
Swift Forums
[Pitch] Deriving values of other non-escapable types from the span family
Hello everyone! A new span can be derived from an existing one by using the extracting methods. However, there is no paved way to perform an equivalent derivation for values of other non-escapable types as the withUnsafe(Mutable)BufferPointer and withUnsafe(Mutable)Bytes methods require an escapable return value. For values of such types, the span's pointer has to be returned from those methods (which is not recommended), while being careful to ensure that the lifetime of the new value is bound...
0 comments
No comments yet.