fromStruct static method

Implementation

static Danger<PropertyRoster, PropertyException> fromStruct(Iterable<PropertyStruct> struct) {

    final log = Log(classLocation: PropertyRoster, functionLocation: 'fromStruct');

    final List<Property> list = [];

    for (final i in struct) {

        final result = Property.fromStruct(i);
        log.add(result);
        if (result is! Success<Property, PropertyException>) return Failure(result.asException, log);

        list.add(result.wrapped);

    }

    final result = PropertyRoster.result(list);
    log.add(result);

    return Danger.fromDanger(result, log);

}