unwrap

Downcast object to type T, or unwrap it from Placeholder!T.

Downcast object to type T, or unwrap it from Placeholder!T. If T is rooted in Object, downcast will be performed, otherwise it is assumed that T is stored in Placeholder!T object, and therefore object is downcast to Placeholder!T and then returned.

  1. T unwrap(inout(Object) object)
    ref @trusted nothrow
    T
    unwrap
    (
    T
    )
    (
    inout(Object) object
    )
  2. T unwrap(T placeholder)
  3. T unwrap(inout(Object) object)

Parameters

object inout(Object)

object from which to unwrap value of type T

Return Value

Type: T

T if it is rooted in Object, or Placeholder!T if it is not.

Meta