diff --git a/src/rstd/nullable.rs b/src/rstd/nullable.rs index 3969a95..138a9e8 100644 --- a/src/rstd/nullable.rs +++ b/src/rstd/nullable.rs @@ -91,6 +91,13 @@ impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>> Nullable<'a, Ctx, A> { Nullable::NotNull(point) => Some(point), } } + + pub fn is_null(&self) -> bool { + match self { + Nullable::Null(_) => true, + Nullable::NotNull(_) => false, + } + } } impl<F> NullableFactory<F> {