fromBlockSandwich static method
Danger<ProtectContentRoster, ImmatureCitrusSemanticException>
fromBlockSandwich(
- Iterable<
BlockSandwich> values
Implementation
static Danger<ProtectContentRoster, ImmatureCitrusSemanticException> fromBlockSandwich(Iterable<BlockSandwich> values) {
final log = Log(classLocation: ProtectContentRoster, functionLocation: 'fromBlockSandwich');
final List<ProtectContent> list = [];
for (final i in values) {
final result = ProtectContent.fromBlockSandwich(i);
log.add(result);
if (result is! Success<ProtectContent, ImmatureCitrusSemanticException>) return Failure(result.asException, log);
list.add(result.wrapped);
}
final result = ProtectContentRoster.result(list);
log.add(result);
return Danger.fromDanger(result, log);
}