Interface IReadOnlySpanConsumer<T>
Represents functional interface returning no value and accepting the single argument of type ReadOnlySpan<T>.
Inherited Members
Namespace: DotNext.Buffers
Assembly: DotNext.dll
Syntax
public interface IReadOnlySpanConsumer<T> : ISupplier<ReadOnlyMemory<T>, CancellationToken, ValueTask>, IFunctional<Func<ReadOnlyMemory<T>, CancellationToken, ValueTask>>
Type Parameters
Name | Description |
---|---|
T | The type of the elements in the span. |
Remarks
Functional interface can be used to pass some application logic without heap allocation in contrast to regular delegates. Additionally, implementation of functional interface may have encapsulated data acting as closure which is not allocated on the heap.
Methods
| Edit this page View SourceInvoke(ReadOnlySpan<T>)
Invokes the consumer.
Declaration
void Invoke(ReadOnlySpan<T> span)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<T> | span | The span of elements. |