Expected.this

Constructs an Expected with value or error based on the tye of the provided.

In case when T == E, it constructs Expected with value.

In case when T == void, it constructs Expected with error value.

Default constructor (if enabled) initializes Expected to T.init value. If T == void, it initializes Expected with no error.

  1. this(CT val)
    struct Expected(T, E = string, Hook = Abort)
    this
    ()
    (
    auto ref CT val
    )
    if (
    !is(E == void) &&
    (
    !is(T == void)
    )
    )
  2. this(E val, bool success)
  3. this()

Meta