LCOV - code coverage report
Current view: top level - async-2.5.0/lib/src/result - capture_sink.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 0 7 0.0 %
Date: 2021-11-28 14:37:50 Functions: 0 0 -

          Line data    Source code
       1             : // Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
       2             : // for details. All rights reserved. Use of this source code is governed by a
       3             : // BSD-style license that can be found in the LICENSE file.
       4             : 
       5             : import 'dart:async';
       6             : 
       7             : import 'result.dart';
       8             : 
       9             : /// Used by [Result.captureSink].
      10             : class CaptureSink<T> implements EventSink<T> {
      11             :   final EventSink<Result<T>> _sink;
      12             : 
      13           0 :   CaptureSink(EventSink<Result<T>> sink) : _sink = sink;
      14             : 
      15           0 :   @override
      16             :   void add(T value) {
      17           0 :     _sink.add(Result<T>.value(value));
      18             :   }
      19             : 
      20           0 :   @override
      21             :   void addError(Object error, [StackTrace? stackTrace]) {
      22           0 :     _sink.add(Result.error(error, stackTrace));
      23             :   }
      24             : 
      25           0 :   @override
      26             :   void close() {
      27           0 :     _sink.close();
      28             :   }
      29             : }

Generated by: LCOV version 1.14