Struct spacetimedb_sats::ValueWithType
source · pub struct ValueWithType<'a, T: Value> { /* private fields */ }
Expand description
A borrowed value combined with its type and typing context (Typespace
).
Implementations§
source§impl<'a> ValueWithType<'a, ProductValue>
impl<'a> ValueWithType<'a, ProductValue>
pub fn elements( &self ) -> impl ExactSizeIterator<Item = ValueWithType<'a, AlgebraicValue>>
source§impl<'a, T: Value> ValueWithType<'a, T>
impl<'a, T: Value> ValueWithType<'a, T>
sourcepub fn new(ty: WithTypespace<'a, T::Type>, val: &'a T) -> Self
pub fn new(ty: WithTypespace<'a, T::Type>, val: &'a T) -> Self
Wraps the borrowed value val
with its type combined with context.
pub fn ty_s(&self) -> WithTypespace<'a, T::Type>
source§impl<'a, T: Value> ValueWithType<'a, Vec<T>>
impl<'a, T: Value> ValueWithType<'a, Vec<T>>
pub fn iter(&self) -> impl Iterator<Item = ValueWithType<'_, T>>
Trait Implementations§
source§impl<T: Value> Clone for ValueWithType<'_, T>
impl<T: Value> Clone for ValueWithType<'_, T>
source§impl Serialize for ValueWithType<'_, AlgebraicValue>
impl Serialize for ValueWithType<'_, AlgebraicValue>
source§impl Serialize for ValueWithType<'_, ArrayValue>
impl Serialize for ValueWithType<'_, ArrayValue>
source§impl Serialize for ValueWithType<'_, MapValue>
impl Serialize for ValueWithType<'_, MapValue>
source§impl Serialize for ValueWithType<'_, ProductValue>
impl Serialize for ValueWithType<'_, ProductValue>
source§impl Serialize for ValueWithType<'_, SumValue>
impl Serialize for ValueWithType<'_, SumValue>
source§impl<T: Value> Serialize for ValueWithType<'_, Vec<T>>where
for<'a> ValueWithType<'a, T>: Serialize,
impl<T: Value> Serialize for ValueWithType<'_, Vec<T>>where
for<'a> ValueWithType<'a, T>: Serialize,
impl<T: Value> Copy for ValueWithType<'_, T>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for ValueWithType<'a, T>
impl<'a, T> Send for ValueWithType<'a, T>
impl<'a, T> Sync for ValueWithType<'a, T>
impl<'a, T> Unpin for ValueWithType<'a, T>
impl<'a, T> UnwindSafe for ValueWithType<'a, T>
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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> Satn for T
impl<T> Satn for T
source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the SATN data format into the formatter
f
.source§fn fmt_psql(&self, f: &mut Formatter<'_>) -> Result
fn fmt_psql(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the postgres SATN data format into the formatter
f
.source§fn to_satn(&self) -> String
fn to_satn(&self) -> String
Formats the value using the SATN data format into the returned
String
.source§fn to_satn_pretty(&self) -> String
fn to_satn_pretty(&self) -> String
Pretty prints the value using the SATN data format into the returned
String
.