Storage actor

Rocket.storageFunction
storage(::Type{T}) where T

Arguments

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

Creation operator for the StorageActor actor.

Examples

using Rocket

actor = storage(Int)
actor isa StorageActor{Int}

# output
true

See also: StorageActor, AbstractActor

source
Rocket.StorageActorType
StorageActor{D}() where D

Storage actor provides an actor that stores a single (last) value passed to the next! callback. It saves last incoming successful next event in the value field, throws an ErrorException on error! event and does nothing on completion event. Before any events value initialised with nothing.

Examples

using Rocket

source = from(1:5)
actor  = storage(Int)

subscribe!(source, actor)
show(getvalues(actor))

# output
5

See also: Actor, storage

source