Creates a new ScopedRef from an effect that resourcefully produces a value.
Creates a new ScopedRef from the specified value. This method should not be used for values whose creation require the acquisition of resources.