#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum ShapeType {
Boolean,
Byte,
Short,
Integer,
Long,
Float,
Double,
BigInteger,
BigDecimal,
String,
Blob,
Timestamp,
Document,
List,
Map,
Structure,
Union,
Member,
}
impl ShapeType {
#[inline]
pub fn is_simple(&self) -> bool {
matches!(
self,
Self::Boolean
| Self::Byte
| Self::Short
| Self::Integer
| Self::Long
| Self::Float
| Self::Double
| Self::BigInteger
| Self::BigDecimal
| Self::String
| Self::Blob
| Self::Timestamp
| Self::Document
)
}
#[inline]
pub fn is_aggregate(&self) -> bool {
matches!(self, Self::List | Self::Map | Self::Structure | Self::Union)
}
#[inline]
pub fn is_member(&self) -> bool {
matches!(self, Self::Member)
}
}