pub enum ParamValue {
Null,
Bool(bool),
Int64(i64),
UInt64(u64),
Float64(f64),
DecimalText(String),
Text(String),
Bytes(Vec<u8>),
Vector(Vec<f32>),
Json(Vec<u8>),
Timestamp(i64),
Uuid([u8; 16]),
}Expand description
Transport-neutral parameter value vocabulary from ADR 0015.
UInt64 and DecimalText extend the ADR’s ten-variant enumeration with
the lossless wire/body number vocabulary. The legacy binary protocol
binds unsigned parameters over the full u64 range, while JSON transports
carry beyond-native precision in $decimal envelopes; the seam preserves
both instead of narrowing them before execution.
Variants§
Null
Bool(bool)
Int64(i64)
UInt64(u64)
Float64(f64)
DecimalText(String)
Text(String)
Bytes(Vec<u8>)
Vector(Vec<f32>)
Json(Vec<u8>)
Timestamp(i64)
Uuid([u8; 16])
Implementations§
Source§impl ParamValue
impl ParamValue
Sourcepub fn decode_json(value: &Value) -> Result<Self, String>
pub fn decode_json(value: &Value) -> Result<Self, String>
Decode the shared JSON parameter vocabulary used by HTTP, MCP, and stdio JSON-RPC. Typed single-key envelopes preserve values ordinary JSON cannot represent losslessly.
Sourcepub fn decode_json_lossy(value: &Value) -> Self
pub fn decode_json_lossy(value: &Value) -> Self
Decode a general JSON payload while preserving unrecognized typed envelopes as JSON. Row insertion historically accepts those objects as document values rather than rejecting the request as a bind error.
Trait Implementations§
Source§impl Clone for ParamValue
impl Clone for ParamValue
Source§impl Debug for ParamValue
impl Debug for ParamValue
Source§impl From<ParamValue> for Value
impl From<ParamValue> for Value
Source§fn from(value: ParamValue) -> Self
fn from(value: ParamValue) -> Self
Source§impl PartialEq for ParamValue
impl PartialEq for ParamValue
impl StructuralPartialEq for ParamValue
Auto Trait Implementations§
impl Freeze for ParamValue
impl RefUnwindSafe for ParamValue
impl Send for ParamValue
impl Sync for ParamValue
impl Unpin for ParamValue
impl UnsafeUnpin for ParamValue
impl UnwindSafe for ParamValue
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request