run method

  1. @override
Result<Value> run()
override

Implements the business logic as a pipeline of steps.

Structure run as a chain of Result.andThen calls: early returns (validations) at the top, the happy path last. Each private method carries a single responsibility and an explicit return type:

@override
Result<User> run() =>
    _requireName()
        .andThen((_) => _requireEmail())
        .andThen((_) => _persistUser());

The first failure in the chain short-circuits all remaining steps.

Implementation

@override
Result<Value> run() => _result;