unpack

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

Downcast object to type T, or destructively 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 it's value extracted and placeholder itself is disposed of.

  1. T unpack(Object object, RCIAllocator allocator)
    @trusted
    T
    unpack
    (
    T
    )
    (
    Object object
    ,
    RCIAllocator allocator = theAllocator
    )
  2. T unpack(Object object, RCIAllocator allocator)
  3. Z unpack(T placeholder, RCIAllocator allocator)

Parameters

object 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