isSubscribable

Test if the observer can subscribe to the observable.

template isSubscribable (
TObservable
TObserver
) {}

Members

Variables

isSubscribable
enum bool isSubscribable;
Undocumented in source.

Examples

struct TestDisposable
{
    void dispose()
    {
    }
}

struct TestObserver
{
    void put(int n)
    {
    }

    void completed()
    {
    }

    void failure(Exception e)
    {
    }
}

struct TestObservable
{
    alias ElementType = int;

    TestDisposable subscribe(TestObserver observer)
    {
        return TestDisposable();
    }
}

static assert(isSubscribable!(TestObservable, TestObserver));

Meta