pub enum TemplateVar {
Str(String),
Int(i64),
Float(f64),
Bool(bool),
List(Vec<TemplateVar>),
Map(HashMap<String, TemplateVar>),
}Expand description
A dynamically-typed value that can be stored in a TemplateContext.
Variants§
Str(String)
A UTF-8 string.
Int(i64)
A 64-bit signed integer.
Float(f64)
A 64-bit floating-point number.
Bool(bool)
A boolean.
List(Vec<TemplateVar>)
An ordered list of TemplateVar values.
Map(HashMap<String, TemplateVar>)
A string-keyed map of TemplateVar values.
Implementations§
Trait Implementations§
Source§impl Clone for TemplateVar
impl Clone for TemplateVar
Source§fn clone(&self) -> TemplateVar
fn clone(&self) -> TemplateVar
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemplateVar
impl Debug for TemplateVar
Source§impl PartialEq for TemplateVar
impl PartialEq for TemplateVar
Source§fn eq(&self, other: &TemplateVar) -> bool
fn eq(&self, other: &TemplateVar) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TemplateVar
Auto Trait Implementations§
impl Freeze for TemplateVar
impl RefUnwindSafe for TemplateVar
impl Send for TemplateVar
impl Sync for TemplateVar
impl Unpin for TemplateVar
impl UnsafeUnpin for TemplateVar
impl UnwindSafe for TemplateVar
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§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>
Wrap the input message
T in a tonic::Request