pub fn default_embedded_value(&self) -> ScalarType {
        use ScalarType::*;
        match self {
            List {
                element_type,
                custom_oid: None,
            } => List {
                element_type: Box::new(element_type.default_embedded_value()),
                custom_oid: None,
            },
            Map {
                value_type,
                custom_oid: None,
            } => Map {
                value_type: Box::new(value_type.default_embedded_value()),
                custom_oid: None,
            },
            Array(a) => Array(Box::new(a.default_embedded_value())),
            Numeric { .. } => Numeric { scale: None },
            // Char's default length should not be `Some(1)`, but instead `None`
            // to support Char values of different lengths in e.g. lists.
            Char { .. } => Char { length: None },
            VarChar { .. } => VarChar { length: None },
            v => v.clone(),
        }
    }
/// Returns `self` with any embedded values set to a value appropriate for a
/// collection of the type. Namely, this should set optional scales or
/// limits to `None`.
Returns `self` with any embedded values set to a value appropriate for a
collection of the type. Namely, this should set optional scales or
limits to `None`.
Returns ` self ` with any embedded values set to a value appropriate for a collection of the type . Namely this should set optional scales or limits to ` None ` .
pub fn default_embedded_value(&self) -> ScalarType {
        use ScalarType::*;
        match self {
            List {
                element_type,
                custom_oid: None,
            } => List {
                element_type: Box::new(element_type.default_embedded_value()),
                custom_oid: None,
            },
            Map {
                value_type,
                custom_oid: None,
            } => Map {
                value_type: Box::new(value_type.default_embedded_value()),
                custom_oid: None,
            },
            Array(a) => Array(Box::new(a.default_embedded_value())),
            Numeric { .. } => Numeric { scale: None },
            // Char's default length should not be `Some(1)`, but instead `None`
            // to support Char values of different lengths in e.g. lists.
            Char { .. } => Char { length: None },
            VarChar { .. } => VarChar { length: None },
            v => v.clone(),
        }
    }
pub fn default_embedded_value ( & self ) -> ScalarType { use ScalarType :: * ; match self { List { element_type , custom_oid : None , } => List { element_type : Box :: new ( element_type . default_embedded_value ( ) ) , custom_oid : None , } , Map { value_type , custom_oid : None , } => Map { value_type : Box :: new ( value_type . default_embedded_value ( ) ) , custom_oid : None , } , Array ( a ) => Array ( Box :: new ( a . default_embedded_value ( ) ) ) , Numeric { .. } => Numeric { scale : None } , // Char's default length should not be `Some(1)`, but instead `None` // to support Char values of different lengths in e.g. lists. Char { .. } => Char { length : None } , VarChar { .. } => VarChar { length : None } , v => v . clone ( ) , } }
Returns `self` with any embedded values set to a value appropriate for a
collection of the type.
Returns ` self ` with any embedded values set to a value appropriate for a collection of the type .
&self
&self