Constructor taking rvalue. Uniqueness is achieve only if there is no aliases of the passed reference.
Constructor taking lvalue. Uniqueness is achieve only if there is no other copies of the passed reference.
Constructor that take a rvalue. u can only be a rvalue because postblit is disabled.
Destructor that disposes the resource.
Forwarding method calls and member access to the underlying object.
Checks whether a resource is assigned.
Explicitely ispose the underlying resource.
Transfer ownership from a Uniq of a type that is convertible to our type. u can only be a rvalue because postblit is disabled.
Shortcut to assigned
Transfer the ownership.
A view on the underlying object.
A helper struct that manage the lifetime of a Disposable using RAII. Note: dlang has capability to enforce a parameter be a lvalue (ref param) but has no mechanism such as c++ rvalue reference which would enforce true uniqueness by the compiler. Uniq gives additional robustness, but it is up to the programmer to make sure that the values passed in by rvalue are not referenced somewhere else in the code