pub struct TemplateVariable {
pub name: String,
pub description: String,
pub required: bool,
pub source: i32,
pub default_value: String,
pub pii: bool,
}Expand description
A variable placeholder within a template that gets substituted during rendering.
Fields§
§name: StringVariable name used in the template body (e.g. “employee_name”). Constraints: Max length 100 characters.
description: StringHuman-readable description of what this variable represents. Constraints: Max length 500 characters.
required: boolWhether this variable must be provided during rendering.
source: i32Where this variable’s value comes from (profile attribute or campaign config).
default_value: StringFallback value used when the source does not provide a value. Constraints: Max length 1000 characters.
pii: boolWhen true, this variable’s rendered value is masked in session replay and heatmap screenshots. Org admin controls per variable.
Implementations§
Source§impl TemplateVariable
impl TemplateVariable
Sourcepub fn source(&self) -> TemplateVariableSource
pub fn source(&self) -> TemplateVariableSource
Returns the enum value of source, or the default if the field is set to an invalid enum value.
Sourcepub fn set_source(&mut self, value: TemplateVariableSource)
pub fn set_source(&mut self, value: TemplateVariableSource)
Sets source to the provided enum value.
Trait Implementations§
Source§impl Clone for TemplateVariable
impl Clone for TemplateVariable
Source§fn clone(&self) -> TemplateVariable
fn clone(&self) -> TemplateVariable
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TemplateVariable
impl Debug for TemplateVariable
Source§impl Default for TemplateVariable
impl Default for TemplateVariable
Source§impl Hash for TemplateVariable
impl Hash for TemplateVariable
Source§impl Message for TemplateVariable
impl Message for TemplateVariable
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for TemplateVariable
impl PartialEq for TemplateVariable
impl Eq for TemplateVariable
impl StructuralPartialEq for TemplateVariable
Auto Trait Implementations§
impl Freeze for TemplateVariable
impl RefUnwindSafe for TemplateVariable
impl Send for TemplateVariable
impl Sync for TemplateVariable
impl Unpin for TemplateVariable
impl UnsafeUnpin for TemplateVariable
impl UnwindSafe for TemplateVariable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> 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