pub trait FromSpgValue: Sized {
// Required method
fn from_spg_value(v: &Value) -> Result<Self, &'static str>;
}Expand description
v7.3.0 — per-column decoder used by spg_row!. Surface
covers every numeric / text / bytes / bool variant in
Value, plus Option<T> for nullable columns.
Required Methods§
Sourcefn from_spg_value(v: &Value) -> Result<Self, &'static str>
fn from_spg_value(v: &Value) -> Result<Self, &'static str>
Decode one cell into Self. The returned &'static str
is a short diagnostic for type mismatches (e.g. "expected integer, got TEXT"); callers wrap it into their own
error type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".