asByteString

@UnsafeByteStringApi
fun ByteArray.asByteString(): ByteString(source)

Returns a ByteString view of this ByteArray, without copying data.

Warning: this ByteArray must not be modified for the lifetime of the returned ByteString. If this cannot be guaranteed, use the ByteString constructor instead.