abstract class Signal[F[_], A] extends immutable.Signal[F, A]
Data type of a single value of type A
that can be read and written in the effect F
.
- Self Type
- Signal[F, A]
- Source
- Signal.scala
- Alphabetic
- By Inheritance
- Signal
- Signal
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Signal()
Abstract Value Members
-
abstract
def
continuous: Stream[F, A]
Returns the continuous version of this signal, which emits the current
A
value on each request for an element from the stream.Returns the continuous version of this signal, which emits the current
A
value on each request for an element from the stream.Note that this may not see all changes of
A
as it always gets the currentA
at each request for an element.- Definition Classes
- Signal
-
abstract
def
discrete: Stream[F, A]
Returns the discrete version of this signal, updated only when the value is changed.
Returns the discrete version of this signal, updated only when the value is changed.
The value _may_ change several times between reads, but it is guaranteed the latest value will be emitted after a series of changes.
If you want to be notified about every single change, use
async.queue
for signalling.- Definition Classes
- Signal
-
abstract
def
get: F[A]
Asynchronously gets the current value of this
Signal
.Asynchronously gets the current value of this
Signal
.- Definition Classes
- Signal
-
abstract
def
modify(f: (A) ⇒ A): F[Change[A]]
Asynchronously sets the current value of this
Signal
and returns new value of thisSignal
.Asynchronously sets the current value of this
Signal
and returns new value of thisSignal
.f
is consulted to set this signal.F
returns the result of applyingop
to current value. -
abstract
def
modify2[B](f: (A) ⇒ (A, B)): F[(Change[A], B)]
Like modify but allows extraction of a
B
fromA
and returns it along with theChange
. -
abstract
def
refresh: F[Unit]
Asynchronously refreshes the value of the signal, keeping the value of this
Signal
the same, but notifing any listeners. -
abstract
def
set(a: A): F[Unit]
Sets the value of this
Signal
.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Signal[F, A], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def ensuring(cond: (Signal[F, A]) ⇒ Boolean, msg: ⇒ Any): Signal[F, A]
- def ensuring(cond: (Signal[F, A]) ⇒ Boolean): Signal[F, A]
- def ensuring(cond: Boolean, msg: ⇒ Any): Signal[F, A]
- def ensuring(cond: Boolean): Signal[F, A]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
imap[B](f: (A) ⇒ B)(g: (B) ⇒ A)(implicit F: Functor[F]): Signal[F, B]
Returns an alternate view of this
Signal
where its elements are of typeB
, given two functions,A => B
andB => A
. -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def →[B](y: B): (Signal[F, A], B)