observerObject

Wraps subscribe method in virtual function.

template observerObject(E)
observerObject
(
R
)
()

Members

Functions

observerObject
ObserverObject!(R, E) observerObject(R range)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

struct TestObserver
{
    void put(int n)
    {
    }

    void put(Object obj)
    {
    }
}

Observer!int observer = observerObject!int(TestObserver());
observer.put(0);
observer.completed();
observer.failure(null);
static assert(isObserver!(typeof(observer), int));

Meta