Skip to main content

is_bare_reader_scalar_ty

Function is_bare_reader_scalar_ty 

Source
pub(crate) fn is_bare_reader_scalar_ty(ty: &Type) -> bool
Expand description

True if ty names a known scalar, qualified or bare (no Option or generics).

These are the element types whose Vec<Option<ty>> round-trips through TryFromSexp — required for the column-expansion readers, which read each expanded slot as Vec<Option<elem>> (the write side wraps every slot in Option). Allowing Option<scalar> here would ask for Vec<Option<Option<…>>>, which has no TryFromSexp impl.

pub(super) so enum_expansion.rs can reuse it.