/// Minimal Result sum type. Use for domain operations that may fail. sealed class Result { const Result(); bool get isOk => this is Ok; bool get isErr => this is Err; } final class Ok extends Result { final T value; const Ok(this.value); } final class Err extends Result { final E error; const Err(this.error); }