nano_var library

Classes

FailNanoReadStatus<T>
A class describing that a Future has completed by throwing an error.
FutureNanoReadStatus<T>
A class describing the current status of a NanoRead instance produced by FutureNanoRead.
NanoRead<T>
Instances of NanoRead can be used to access a value of type T and it's possible to subscribe to changes to this value.
NanoVar<T>
Instances of this class holds a value of type T and it's possible to subscribe to changes to this value.
SucceessNanoReadStatus<T>
A class describing that a Future has completed successfully.
UncompletedNanoReadStatus<T>
A class describing that a Future has not been completed.

Extensions

ApplicativeNanoRead on NanoRead<T>
An extension of NanoRead that makes NanoRead act as an applicative functor, i.e. the method liftA2 can be called with a callback, which returns a new NanoRead instance containing the values returned by the given callback, updated as the original NanoRead instances updates.
FunctorNanoRead on NanoRead<T>
An extension of NanoRead that makes NanoRead act as a functor, i.e. the method map can be called with a callback, which returns a new NanoRead instance containing the values returned by the given callback, updated as the original NanoRead updates.
FutureNanoRead on Future<T>
An extension of Future that can create a NanoRead instance from the Future where the created NanoRead instance contains the completion status of the Future.
MonadNanoRead on NanoRead<T>
An extension of NanoRead that makes NanoRead act as a monad, i.e. the method binder can be called with a callback, which returns a new NanoRead instance containing the values returned by the NanoRead instance most recently returned by binder.

Typedefs

NanoReadSubscribeCallback<T> = void Function(T oldValue, T newValue)
The callback type accepted by NanoRead.subscribe.