Struct ReadOnlySpanConsumer<T, TArg>
Represents typed function pointer implementing IReadOnlySpanConsumer<T>.
Implements
Inherited Members
Namespace: DotNext.Buffers
Assembly: DotNext.dll
Syntax
[CLSCompliant(false)]
public readonly struct ReadOnlySpanConsumer<T, TArg> : 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. |
| TArg | The type of the argument to be passed to the function. |
Remarks
This type follows signature of ReadOnlySpanAction<T, TArg> delegate.
Constructors
| Edit this page View SourceReadOnlySpanConsumer(delegate*<ReadOnlySpan<T>, TArg, void>, TArg)
Wraps the function pointer and captures the argument.
Declaration
public ReadOnlySpanConsumer(delegate*<ReadOnlySpan<T>, TArg, void> ptr, TArg arg)
Parameters
| Type | Name | Description |
|---|---|---|
| delegate*<ReadOnlySpan<T>, TArg, void> | ptr | The function pointer. |
| TArg | arg | The argument to be passed to the function represented by the function pointer. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
Properties
| Edit this page View SourceIsEmpty
Gets a value indicating that this function pointer is zero.
Declaration
public bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |