import rx.subject : SubjectObject; auto sub = new SubjectObject!int; bool result = false; sub.all().doSubscribe((bool res) { result = res; }); sub.put(0); sub.completed(); assert(result);
See Implementation