Trait clang::Nullable [] [src]

pub trait Nullable<T> {
    fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U>;
}

A type which may be null or otherwise invalid.

Required Methods

fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Option<U>

Transforms this value into an Option<U>, mapping a null value to None and a non-null value to Some(v) where v is the result of applying the supplied function to this value.

Implementors