Lambda actor

Rocket.lambdaFunction
lambda(; on_next = nothing, on_error = nothing, on_complete = nothing)
lambda(::Type{T}; on_next = nothing, on_error = nothing, on_complete = nothing) where T

Creation operator for the 'LambdaActor' actor.

Examples

using Rocket

actor = lambda(Int; on_next = (d) -> println(d))
actor isa LambdaActor{Int}

# output
true

See also: LambdaActor, AbstractActor

source
Rocket.LambdaActorType
LambdaActor{D, N, E, C}(on_next::N, on_error::E, on_complete::C) where D

Lambda actor wraps on_next, on_error, on_complete callbacks for data, error and complete events. Should not be used explicitly, use lambda creation operator instead.

Constructor arguments

  • on_next: Callback for data event. Optional. Default is nothing.
  • on_error: Callback for error event. Optional. Default is nothing.
  • on_complete: Callback for complete event. Optional. Default is nothing.

See also: Actor, lambda

source