Lambda actor
Rocket.lambda
— Functionlambda(; 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
Rocket.LambdaActor
— TypeLambdaActor{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 isnothing
.on_error
: Callback for error event. Optional. Default isnothing
.on_complete
: Callback for complete event. Optional. Default isnothing
.