Skip to content

Commit 12ed283

Browse files
committed
Add ValueType::is_option
1 parent fbb7f31 commit 12ed283

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/value.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ pub trait ValueType: Sized {
232232
Self::try_from(v).expect(msg)
233233
}
234234

235+
fn is_option() -> bool {
236+
false
237+
}
238+
235239
fn type_name() -> String;
236240

237241
fn array_type() -> ArrayType;
@@ -643,6 +647,10 @@ where
643647
}
644648
}
645649

650+
fn is_option() -> bool {
651+
true
652+
}
653+
646654
fn type_name() -> String {
647655
format!("Option<{}>", T::type_name())
648656
}

0 commit comments

Comments
 (0)