Function glib::translate::some_if

source ·
pub fn some_if<B: ToBool, T, F: FnOnce() -> T>(cond: B, f: F) -> Option<T>
Expand description

Returns Some(val) if the condition is true and None otherwise.