pub enum ContextValue {
Bool(bool),
Integer(i64),
Decimal(Decimal),
Text(String),
Timestamp(Timestamp),
}Expand description
A scalar or text context value in canonical form (3.2). Decimals are strings, so a request holds no binary floating-point number.
Variants§
Implementations§
Source§impl ContextValue
impl ContextValue
Sourcepub fn value_bytes(&self) -> usize
pub fn value_bytes(&self) -> usize
The bytes this value counts against MAX_CONTEXT_VALUE_BYTES: a
text’s UTF-8 bytes, otherwise the canonical bytes of the scalar.
Trait Implementations§
Source§impl Clone for ContextValue
impl Clone for ContextValue
Source§impl Debug for ContextValue
impl Debug for ContextValue
Source§impl<'de> Deserialize<'de> for ContextValue
impl<'de> Deserialize<'de> for ContextValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContextValue
Source§impl JsonSchema for ContextValue
impl JsonSchema for ContextValue
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for ContextValue
impl PartialEq for ContextValue
Source§impl Serialize for ContextValue
impl Serialize for ContextValue
impl StructuralPartialEq for ContextValue
Auto Trait Implementations§
impl Freeze for ContextValue
impl RefUnwindSafe for ContextValue
impl Send for ContextValue
impl Sync for ContextValue
impl Unpin for ContextValue
impl UnsafeUnpin for ContextValue
impl UnwindSafe for ContextValue
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