Skip to content

unwrap_or_else

In std/option.

fn unwrap_or_else(self, default: () -> T) : T

The value of self when present, and what default returns otherwise; default is called only when self is none: [1, 2][5] | unwrap_or_else(() => 7) is 7.