vortex_scalar/
null.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4use vortex_error::VortexError;
5
6use crate::Scalar;
7
8impl TryFrom<&Scalar> for () {
9    type Error = VortexError;
10
11    fn try_from(scalar: &Scalar) -> Result<Self, Self::Error> {
12        scalar.value().as_null()
13    }
14}
15
16impl TryFrom<Scalar> for () {
17    type Error = VortexError;
18
19    fn try_from(scalar: Scalar) -> Result<Self, Self::Error> {
20        <()>::try_from(&scalar)
21    }
22}