- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for IsDefined (0.15 sec)
-
test/typeparam/issue50485.dir/a.go
return r(a, b) } type Option[T any] struct { v *T } func (r Option[T]) IsDefined() bool { return r.v != nil } func (r Option[T]) IsEmpty() bool { return !r.IsDefined() } func (r Option[T]) Get() T { return *r.v } func (r Option[T]) String() string { if r.IsDefined() { return fmt.Sprintf("Some(%v)", r.v) } else { return "None" } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 17:22:18 UTC 2023 - 4.4K bytes - Viewed (0)