2025-10-15 10:12:44 +03:00

16 lines
243 B
Go

package dirty
type Cloneable[T any] interface {
Clone() T
}
type Value[T any] interface {
Value() T
Original() T
Dirty() bool
Change(apply func(T))
ChangeIf(cond func(T) bool, apply func(T)) bool
Delete()
Locked(fn func(Value[T]))
}