Keep actor

Rocket.keepFunction
keep(::Type{T}) where T

Arguments

  • ::Type{T}: Type of keep data

Creation operator for the KeepActor actor.

Examples

using Rocket

actor = keep(Int)
actor isa KeepActor{Int}

# output
true

See also: KeepActor, AbstractActor

source
Rocket.KeepActorType
KeepActor{D}() where D

Keep actor provides a storage actor. It saves all incoming successful next events in a values array, throws an ErrorException on error! event and does nothing on completion event.

Examples

using Rocket

source = from(1:5)
actor  = KeepActor{Int}()

subscribe!(source, actor)
show(actor.values)

# output
[1, 2, 3, 4, 5]

See also: Actor

source