SegmentVerifier<T> typedef Null safety

Result<void, String> SegmentVerifier<T>(
  1. Segment<T> current,
  2. String path

A function that gets called with the RootSegment.

It should return Result.err with an error message if there is something wrong, otherwise it should return Result.ok(null), which means that everything is ok.


typedef SegmentVerifier<T> = Result<void, String> Function(
    Segment<T> current, String path);