Method CopyCollectionStringToPayloadBuffer
CopyCollectionStringToPayloadBuffer<T>(in T, ref LogMemoryManager, bool, bool, bool)
Allocates memory in the LogMemoryManager and copies data into it with headers. Create copy of string message in UTF8 in PayloadBuffer, prepended with optional typeId and length
Declaration
public static PayloadHandle CopyCollectionStringToPayloadBuffer<T>(in T message, ref LogMemoryManager memAllocator, bool prependTypeId = false, bool prependLength = false, bool deferredRelease = false) where T : IUTF8Bytes, INativeList<byte>
Parameters
Type | Name | Description |
---|---|---|
T | message | UTF8 string to copy |
LogMemoryManager | memAllocator | MemoryManager where to allocate the PayloadHandle |
bool | prependTypeId | If true - typeId will be added to payload |
bool | prependLength | If true - length in bytes will be added to payload |
bool | deferredRelease | If true - PayloadHandle will be registered for deferred release (after 2 updates) |
Returns
Type | Description |
---|---|
PayloadHandle | PayloadHandle that holds the data |
Type Parameters
Name | Description |
---|---|
T | UTF8 collections string |