NullableSpanT Structure

Represents a SpanT that may or may not have a value.

Definition

Namespace: Ookii.Common
Assembly: Ookii.Common (in Ookii.Common.dll) Version: 1.0.0+7c2900b8a16cd8ae46bdd79d8f105034712c5fa3
C#
public readonly ref struct NullableSpan<T>
Inheritance
Object    ValueType    NullableSpanT

Type Parameters

T
The type of the items in the SpanT.

Constructors

NullableSpanT Initializes a new instance of the NullableSpanT structure.

Properties

HasValue Gets a value that indicates whether this instance contains a value.
Value Gets the contained value.

Methods

GetTypeGets the Type of the current instance.
(Inherited from Object)
GetValueOrDefault Returns the contained value, or the specified default value if there is no value.
GetValueOrElse Returns the contained value, or the value returned by the specified function if there is no value.
MapTResult(NullableSpanTMapClassFuncTResult) Maps a NullableSpanT to another value by applying a function to the contained value, or returns an empty value if there is no value.
MapTResult(NullableSpanTMapReadOnlyFuncTResult) Maps a NullableSpanT to another value by applying a function to the contained value, or returns an empty value if there is no value.
MapTResult(NullableSpanTMapSpanFuncTResult) Maps a NullableSpanT to another value by applying a function to the contained value, or returns an empty value if there is no value.
MapTResult(NullableSpanTMapStructFuncTResult) Maps a NullableSpanT to another value by applying a function to the contained value, or returns an empty value if there is no value.
ToString Returns a string that represents the current NullableSpanT.
(Overrides ValueTypeToString)
TryGetValue Gets the contained value.

Operators

Equality(NullableSpanT, NullableSpanT) Compares two NullableReadOnlySpanT instances for equality.
(NullableSpanT to SpanT) Explicitly converts a NullableSpanT to a SpanT.
(SpanT to NullableSpanT) Implicitly converts a SpanT to a NullableSpanT.
Inequality(NullableSpanT, NullableSpanT) Compares two NullableReadOnlySpanT instances for inequality.

See Also