Struct google_api_proto::google::apps::card::v1::DecoratedText
source · pub struct DecoratedText {
pub icon: Option<Icon>,
pub start_icon: Option<Icon>,
pub top_label: String,
pub text: String,
pub wrap_text: bool,
pub bottom_label: String,
pub on_click: Option<OnClick>,
pub control: Option<Control>,
}
Expand description
A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget, or a button after the text. For an example in Google Chat apps, see Display text with decorative text.
Fields§
§icon: Option<Icon>
Deprecated in favor of startIcon
.
start_icon: Option<Icon>
The icon displayed in front of the text.
top_label: String
The text that appears above text
. Always truncates.
text: String
Required. The primary text.
Supports simple formatting. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons.
wrap_text: bool
The wrap text setting. If true
, the text wraps and displays on
multiple lines. Otherwise, the text is truncated.
Only applies to text
, not topLabel
and bottomLabel
.
bottom_label: String
The text that appears below text
. Always wraps.
on_click: Option<OnClick>
This action is triggered when users click topLabel
or bottomLabel
.
control: Option<Control>
A button, switch, checkbox, or image that appears to the right-hand side
of text in the decoratedText
widget.
Trait Implementations§
source§impl Clone for DecoratedText
impl Clone for DecoratedText
source§fn clone(&self) -> DecoratedText
fn clone(&self) -> DecoratedText
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DecoratedText
impl Debug for DecoratedText
source§impl Default for DecoratedText
impl Default for DecoratedText
source§impl Message for DecoratedText
impl Message for DecoratedText
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 DecoratedText
impl PartialEq for DecoratedText
source§fn eq(&self, other: &DecoratedText) -> bool
fn eq(&self, other: &DecoratedText) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for DecoratedText
Auto Trait Implementations§
impl Freeze for DecoratedText
impl RefUnwindSafe for DecoratedText
impl Send for DecoratedText
impl Sync for DecoratedText
impl Unpin for DecoratedText
impl UnwindSafe for DecoratedText
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
§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>
T
in a tonic::Request