Nullable::is_null

This commit is contained in:
AF 2023-08-01 20:17:04 +00:00
parent e3df6e523e
commit 5e85d06df6

View File

@ -91,6 +91,13 @@ impl<'a, Ctx: Context<'a>, A: Mentionable<'a, Ctx>> Nullable<'a, Ctx, A> {
Nullable::NotNull(point) => Some(point), Nullable::NotNull(point) => Some(point),
} }
} }
pub fn is_null(&self) -> bool {
match self {
Nullable::Null(_) => true,
Nullable::NotNull(_) => false,
}
}
} }
impl<F> NullableFactory<F> { impl<F> NullableFactory<F> {