fix: minor fixes to types

This commit is contained in:
2024-09-15 18:26:32 +02:00
parent 2c75b20349
commit 4d974d086f
2 changed files with 17 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ type Unwrappable[T any] interface {
// Both an Optional and Result is an Option
type Option[T any] interface {
ValueContainer
Unwrappable[T]
}
@@ -23,6 +24,7 @@ type OptionalI[T any] interface {
Is_none() bool
Ok_or(error) Result[T]
Ok_or_else(func() error) Result[T]
Unwrappable[T]
}
type ResultI[T any] interface {
@@ -30,6 +32,7 @@ type ResultI[T any] interface {
Is_err() bool
Ok() Optional[T]
Err() Optional[error]
Unwrappable[T]
}
// Ensure compile time the interfaces are implemented