The core abstract method that must be implemented by each instance, providing the function behavior.
The core abstract method that must be implemented by each instance, providing the function behavior.
Shortcut for a cast to AsyncFunc.
Shortcut for a cast to AsyncFunc. Fails at runtime with ClassCastException if this function is synchronous.
Shortcut for a cast to SyncFunc.
Shortcut for a cast to SyncFunc. Fails at runtime with ClassCastException if this function is asynchronous.
Materializes the stream, including all components linked (transitively) to this one, and starts running it.
Materializes the stream, including all components linked (transitively) to this one, and starts running it.
The same result is produced no matter which stream component is used to call build
.
This method may only be called once per stream (see README on the subject of reusing components).
This overload of collect
lets you specify an explicit supertype bound of Out
(so you cannot upcast past it)
and in exchange get a precise non-existential return type.
This overload of collect
lets you specify an explicit supertype bound of Out
(so you cannot upcast past it)
and in exchange get a precise non-existential return type.
Irreversibly connects to the sink
.
Irreversibly connects to the sink
.
Returns a new Sink containing this
and the original sink
combined.
Creates a new function composing these two, which is synchronous iff both inputs were synchronous.
Returns a new function that passes any exceptions in the original function to handler
.
Returns a new function that passes any exceptions in the original function to handler
.
The new function still fails with the original exception after the handler
has run.
The returned Func is synchronous iff the original func is synchronous.
Concatenate these sources after the current one.
Concatenate these sources after the current one.
This is named concatWith and not simply Concat because SourceOps.concat refers to the unrelated Transform.concat.
Irreversibly join this source with that sink.
Irreversibly join this source with that sink.
Returns true iff this function is either Func.nop
or Func.nopAsync
.
Returns true iff this function is either Func.nop
or Func.nopAsync
.
Returns true iff this is a function built by Func.pass
.
Returns true iff this is a function built by Func.pass
.
Returns true iff this is a SyncFunc
Called when the component completes.
Called when the component completes. See the README for detailed semantics.
Called on stream failure.
Called on stream failure. See the README for the semantics.
Irreversibly connects to the next
transform
Irreversibly connects to the next
transform
Returns a new pipe containing this
and the next
transform.
Irreversibly connects to the pipe
's input Source.
Irreversibly connects to the pipe
's input Source.
Returns a new pipe appending pipe
to this element.
Adds a synchronous recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.
Adds an asynchronous recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.
Adds an asynchronous recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.
This isn't declared to return an AsyncFunc because it can discard the handler
and return a SyncFunc if the
original function is e.g. nop
or pass
.
Returns either B or a Future[B] depending on the type of this Func.
Adds a recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.
Adds a recovery stage to this function, which handles both synchronously thrown exceptions, and failing futures returned by asynchronous functions.
If this
and handler
are both synchronous, then the result will also be synchronous.
Because the handler
is a Func, it cannot be a partial function; it must handle all NonFatal exceptions.
Exceptions that don't match the NonFatal extractor will not be passed to the handler.
Suppress all errors matched by the NonFatal extractor.
Irreversibly join this source with that sink.
Irreversibly join this source with that sink.
Irreversibly join this source with that pipe's sink.
Irreversibly join this source with that pipe's sink.
Irreversibly join this source with that sink.
Irreversibly join this source with that sink.
Irreversibly join this source with that transform.
Irreversibly join this source with that transform.
Alias for compose
.
Alias for compose
. Creates a new function composing these two, which is synchronous iff both inputs were synchronous.
Implement this trait (at least the onNext method) to create a new synchronous one-to-many Transform.