pub enum TemplateValue {
Text(String),
Number(f64),
Bool(bool),
List(Vec<String>),
}Expand description
A typed value that can be stored in a TemplateContext.
Variants§
Text(String)
A plain text string.
Number(f64)
A number (rendered as its default decimal representation).
Bool(bool)
A boolean (rendered as "true" or "false").
List(Vec<String>)
A list of strings (rendered as comma-separated).
Implementations§
Source§impl TemplateValue
impl TemplateValue
Sourcepub fn to_string_repr(&self) -> String
pub fn to_string_repr(&self) -> String
Convert the value to its string representation.
Trait Implementations§
Source§impl Clone for TemplateValue
impl Clone for TemplateValue
Source§fn clone(&self) -> TemplateValue
fn clone(&self) -> TemplateValue
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 TemplateValue
impl Debug for TemplateValue
Source§impl PartialEq for TemplateValue
impl PartialEq for TemplateValue
Source§fn eq(&self, other: &TemplateValue) -> bool
fn eq(&self, other: &TemplateValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TemplateValue
Auto Trait Implementations§
impl Freeze for TemplateValue
impl RefUnwindSafe for TemplateValue
impl Send for TemplateValue
impl Sync for TemplateValue
impl Unpin for TemplateValue
impl UnsafeUnpin for TemplateValue
impl UnwindSafe for TemplateValue
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