pub struct Icon {
pub alt_text: String,
pub image_type: i32,
pub icons: Option<Icons>,
}
Expand description
An icon displayed in a widget on a card. For an example in Google Chat apps, see Add an icon.
Fields§
§alt_text: String
Optional. A description of the icon used for accessibility.
If unspecified, the default value Button
is provided. As a best practice,
you should set a helpful description for what the icon displays, and if
applicable, what it does. For example, A user's account portrait
, or
Opens a new browser tab and navigates to the Google Chat developer documentation at <https://developers.google.com/workspace/chat
.>
If the icon is set in a [Button
][google.apps.card.v1.Button], the
altText
appears as helper text when the user hovers over the button.
However, if the button also sets text
, the icon’s altText
is ignored.
image_type: i32
The crop style applied to the image. In some cases, applying a
CIRCLE
crop causes the image to be drawn larger than a built-in
icon.
icons: Option<Icons>
The icon displayed in the widget on the card.
Implementations§
Source§impl Icon
impl Icon
Sourcepub fn image_type(&self) -> ImageType
pub fn image_type(&self) -> ImageType
Returns the enum value of image_type
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_image_type(&mut self, value: ImageType)
pub fn set_image_type(&mut self, value: ImageType)
Sets image_type
to the provided enum value.
Trait Implementations§
Source§impl Message for Icon
impl Message for Icon
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
.impl StructuralPartialEq for Icon
Auto Trait Implementations§
impl Freeze for Icon
impl RefUnwindSafe for Icon
impl Send for Icon
impl Sync for Icon
impl Unpin for Icon
impl UnwindSafe for Icon
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<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