Unit
io.github.ykysnk.utils.NonUdon · public readonly struct Unit : IEquatable<Unit>
Stand-in for void where a type argument is required, so an operation with no return value can still produce a Result.
All instances compare equal, so a successful Result<Unit> carries no information beyond its success flag.
Value
public static readonly Unit Value;The instance to return from a successful call that has no value.
TaskValue
public static readonly Task<Unit> TaskValue;A completed task carrying Value, for APIs that want a Task<Unit>.
Equals
public bool Equals(Unit other)
public override bool Equals(object? obj)Always true for another Unit, because every instance represents the same empty value; the object overload returns false for any other type.
GetHashCode
public override int GetHashCode()Always 0, because all instances are equal.
ToString
public override string ToString()Returns the constant name Unit.
operator ==
public static bool operator ==(Unit left, Unit right)Compares two instances, which are always equal, so the result is always true.
operator !=
public static bool operator !=(Unit left, Unit right)Compares two instances, which are never unequal, so the result is always false.