Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:async
  3. StreamSink<S> class
StreamSink
description

StreamSink<S> classabstractinterface

A object that accepts stream events both synchronously and asynchronously.

AStreamSink combines the methods fromStreamConsumer andEventSink.

TheEventSink methods can't be used while theaddStream is called.As soon as theaddStream'sFuture completes with a value, theEventSink methods can be used again.

IfaddStream is called after any of theEventSink methods, it'llbe delayed until the underlying system has consumed the data added by theEventSink methods.

WhenEventSink methods are used, thedoneFuture can be used tocatch any errors.

Whenclose is called, it will return thedoneFuture.

Implemented types
Implementers

Properties

doneFuture
Return a future which is completed when theStreamSink is finished.
no setter
hashCodeint
The hash code for this object.
no setterinherited
runtimeTypeType
A representation of the runtime type of the object.
no setterinherited

Methods

add(Sevent)→ void
Adds a dataevent to the sink.
inherited
addError(Objecterror, [StackTrace?stackTrace])→ void
Adds anerror to the sink.
inherited
addStream(Stream<S>stream)Future
Consumes the elements ofstream.
inherited
close()Future
Tells the stream sink that no further streams will be added.
override
noSuchMethod(Invocationinvocation)→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString()String
A string representation of this object.
inherited

Operators

operator ==(Objectother)bool
The equality operator.
inherited
  1. Dart
  2. dart:async
  3. StreamSink<S> class
dart:async library

[8]ページ先頭

©2009-2025 Movatter.jp