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)
  2. T unwrap(T placeholder)
    ref @trusted nothrow
    T
    unwrap
    (
    Z
    )
  3. T unwrap(inout(Object) object)

Return Value

Type: T

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

Meta