Header menu logo XParsec

ReadableMemory<'T> Type

A memory slice that can be read as input by the parser.

Constructors

Constructor Description

ReadableMemory(memory)

Full Usage: ReadableMemory(memory)

Parameters:
Returns: ReadableMemory<'T>
memory : Memory<'T>
Returns: ReadableMemory<'T>

ReadableMemory(memory)

Full Usage: ReadableMemory(memory)

Parameters:
Returns: ReadableMemory<'T>
memory : ReadOnlyMemory<'T>
Returns: ReadableMemory<'T>

Instance members

Instance member Description

this.AsSpan

Full Usage: this.AsSpan

Parameters:
    viewStart : int
    viewLength : int

Returns: ReadOnlySpan<'T>
viewStart : int
viewLength : int
Returns: ReadOnlySpan<'T>

this.AsSpan

Full Usage: this.AsSpan

Parameters:
    viewStart : int

Returns: ReadOnlySpan<'T>
viewStart : int
Returns: ReadOnlySpan<'T>

this.AsSpan

Full Usage: this.AsSpan

Returns: ReadOnlySpan<'T>

`ReadOnlyMemory<'T>.Span.Slice` already enforces BCL bounds — we delegate directly. The interface validation contract is upheld by that BCL throw.

Returns: ReadOnlySpan<'T>

this.IsEmpty

Full Usage: this.IsEmpty

Returns: bool
Returns: bool

this[index]

Full Usage: this[index]

Parameters:
    index : int

Returns: 'T
index : int
Returns: 'T

this.Length

Full Usage: this.Length

Returns: int
Returns: int

this.Slice

Full Usage: this.Slice

Parameters:
    newStart : int
    newLength : int

Returns: ReadableMemory<'T>
newStart : int
newLength : int
Returns: ReadableMemory<'T>

this.ToImmutableArray

Full Usage: this.ToImmutableArray

Returns: ImmutableArray<'T>

Materialises this view into an ImmutableArray. Allocates a fresh copy.

Returns: ImmutableArray<'T>

this.TryItem

Full Usage: this.TryItem

Parameters:
    index : int

Returns: 'T voption
index : int
Returns: 'T voption

Static members

Static member Description

ReadableMemory.Empty

Full Usage: ReadableMemory.Empty

Returns: ReadableMemory<'T>
Returns: ReadableMemory<'T>

Type something to start searching.