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
.source§impl PartialEq for Icon
impl PartialEq for Icon
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
§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