linkrs-server 0.1.0

Linkrs network service layer (HTTP/gRPC)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Shared helpers for public schema handlers.

use linkrs_core::DataType;

// ==================== Auxiliary Functions ====================

pub(crate) fn parse_data_type(type_str: &str) -> DataType {
    // The wire `data_type` is the core `DataType` Display output; parse it
    // back through the same `FromStr` source of truth. Unrecognized types
    // fall back to String (previous behavior).
    type_str.parse::<DataType>().unwrap_or(DataType::String)
}