struct Subscription {
        const Object handle;
        private immutable size_t index;
        @disable this();
        private this(Object o, size_t i) {
                handle = o;
                index = i;
        }
}

I'd like this to be constructed with a handle to some object, and some other details. The source would create and return the Subscriptions, and the reader would call the object's const methods through the handle. The const "read" methods would take the Subscription as one of the arguments.

Reply via email to