Table of Contents

Struct NatsMemoryOwner<T>

Namespace
NATS.Client.Core
Assembly
NATS.Client.Core.dll

An IMemoryOwner<T> implementation with an embedded length and a fast Span<T> accessor.

public struct NatsMemoryOwner<T> : IMemoryOwner<T>, IDisposable

Type Parameters

T

The type of items to store in the current instance.

Implements
Inherited Members

Properties

Empty

Gets an empty NatsMemoryOwner<T> instance.

Length

Gets the number of items in the current instance

Memory
Span

Gets a Span<T> wrapping the memory belonging to the current instance.

Methods

Allocate(int)

Creates a new NatsMemoryOwner<T> instance with the specified parameters.

Allocate(int, NatsMemoryOwnerAllocationMode)

Creates a new NatsMemoryOwner<T> instance with the specified parameters.

Allocate(int, ArrayPool<T>)

Creates a new NatsMemoryOwner<T> instance with the specified parameters.

Allocate(int, ArrayPool<T>, NatsMemoryOwnerAllocationMode)

Creates a new NatsMemoryOwner<T> instance with the specified parameters.

DangerousGetArray()

Gets an ArraySegment<T> instance wrapping the underlying T array in use.

Dispose()
Slice(int, int)

Slices the buffer currently in use and returns a new NatsMemoryOwner<T> instance.

ToString()