refactor IRenderer

This commit is contained in:
2025-12-22 15:59:02 +09:00
parent 2881fda112
commit d23e701f0a
11 changed files with 112 additions and 255 deletions

View File

@@ -28,6 +28,11 @@ public readonly struct Result
return new Result(false, message);
}
public static Result Failure(ErrorStatus status)
{
return new Result(false, status.ToString());
}
public static Result<T> Success<T>(T value)
{
return Result<T>.Success(value);
@@ -38,6 +43,11 @@ public readonly struct Result
return Result<T>.Failure(message);
}
public static Result<T> Failure<T>(ErrorStatus status)
{
return Result<T>.Failure(status.ToString());
}
public void Deconstruct(out bool success, out string? message)
{
success = IsSuccess;
@@ -116,7 +126,9 @@ public enum ErrorStatus : byte
OutOfMemory,
Timeout,
Cancelled,
UnknownError
UnknownError,
Success = None,
}
public readonly struct Result<T, E>