Struct BufferConsumer<T>
Represents implementation of IReadOnlySpanConsumer<T> in the form of the writer to IBufferWriter<T>.
Implements
Inherited Members
Namespace: DotNext.Buffers
Assembly: DotNext.dll
Syntax
public readonly record struct BufferConsumer<T> : IReadOnlySpanConsumer<T>, ISupplier<ReadOnlyMemory<T>, CancellationToken, ValueTask>, IFunctional<Func<ReadOnlyMemory<T>, CancellationToken, ValueTask>>, IEquatable<BufferConsumer<T>>
Type Parameters
| Name | Description |
|---|---|
| T | The type of the consumer argument. |
Constructors
| Edit this page View SourceBufferConsumer(IBufferWriter<T>)
Wraps the buffer writer.
Declaration
public BufferConsumer(IBufferWriter<T> output)
Parameters
| Type | Name | Description |
|---|---|---|
| IBufferWriter<T> | output | The buffer writer. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
Properties
| Edit this page View SourceIsEmpty
Gets a value indicating that the underlying buffer is null.
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
| Edit this page View SourceToString()
Returns a string that represents the underlying buffer.
Declaration
public override string? ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents the underlying buffer. |