/// <summary>
        /// Writes a <see cref="ReadOnlySpan{T}"/> to a <see cref="IBufferWriterAsync{T}"/>
        /// </summary>
        /// <typeparam name="T">The type of element</typeparam>
        /// <param name="writer">The writer to write to</param>
        /// <param name="value">The <see cref="ReadOnlySpan{T}"/> to read from</param>
        /// <param name="token">A cancellation token to abort the operation</param>
        /// <returns>A task representing the progress fo the write operation</returns>
        public static ValueTask WriteAsync <T>(this IBufferWriterAsync <T> writer, ReadOnlySpan <T> value, CancellationToken token = default)
        {
            var Buffer = writer.GetMemory(value.Length);

            value.CopyTo(Buffer.Span);

            return(writer.AdvanceAsync(value.Length, token));
        }