ae.utils.typecons

Complements the std.typecons package.

Members

Aliases

map
deprecated alias map = std.typecons.apply
Undocumented in source.

Functions

flatten
Nullable!T flatten(Nullable!(Nullable!T) value)

Flatten two levels of Nullable.

require
T require(Nullable!T value, T defaultValue)

If value is not null, return its contents. If value is null, set it to defaultValue and return it. Similar to object.require for associative arrays, and Rust's Option::get_or_insert.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <ae@cy.md>