dpp::utility::icon
utility.h
std::variant< std::monostate, iconhash, image_data > std::variant<std::monostate, iconhash, image_data> dpp::utility::icon::hash_or_data hash_or_data dpp::utility::icon::hash_or_data

Iconhash received or image data for upload.

iconhash & iconhash & dpp::utility::icon::as_iconhash () & as_iconhash dpp::utility::icon::as_iconhash

Get as icon hash.

The behavior is undefined if `is_iconhash() == false`

iconhash& This iconhash

iconhash && iconhash && dpp::utility::icon::as_iconhash () && as_iconhash dpp::utility::icon::as_iconhash

Get as icon hash.

The behavior is undefined if `is_iconhash() == false`

iconhash& This iconhash

const iconhash & const iconhash & dpp::utility::icon::as_iconhash () const & as_iconhash dpp::utility::icon::as_iconhash

Get as icon hash.

The behavior is undefined if `is_iconhash() == false`

iconhash& This iconhash

image_data & image_data & dpp::utility::icon::as_image_data () & as_image_data dpp::utility::icon::as_image_data

Get as image data.

The behavior is undefined if `is_image_data() == false`

image_data& This image

image_data && image_data && dpp::utility::icon::as_image_data () && as_image_data dpp::utility::icon::as_image_data

Get as image.

The behavior is undefined if `is_image_data() == false`

image_data& This image

const image_data & const image_data & dpp::utility::icon::as_image_data () const & as_image_data dpp::utility::icon::as_image_data

Get as image.

The behavior is undefined if `is_image_data() == false`

image_data& This image

bool bool dpp::utility::icon::is_iconhash () const is_iconhash dpp::utility::icon::is_iconhash

Check whether this icon is stored as an iconhash.

iconhash

bool Whether this icon is stored as an iconhash

bool bool dpp::utility::icon::is_image_data () const is_image_data dpp::utility::icon::is_image_data

Check whether this icon is stored as an image.

image_data

bool Whether this icon is stored as an image

icon & icon & dpp::utility::icon::operator= (const iconhash &hash) operator= dpp::utility::icon::operator= const iconhash & hash

Assign to iconhash.

hash

Iconhash

icon & icon & dpp::utility::icon::operator= (const image_data &img) operator= dpp::utility::icon::operator= const image_data & img

Assign to image.

img

Image

icon & icon & dpp::utility::icon::operator= (iconhash &&hash) noexcept operator= dpp::utility::icon::operator= iconhash && hash

Assign to iconhash.

hash

Iconhash

icon & icon & dpp::utility::icon::operator= (image_data &&img) noexcept operator= dpp::utility::icon::operator= image_data && img

Assign to image.

img

Image

Wrapper class around a variant for either iconhash or image, for API objects that have one or the other (generally iconhash when receiving, image when uploading an image).

dpp::utility::icon
hash_or_data
variant< std::monostate, dpp::utility::iconhash, dpp::utility::image_data >
- dpp::utility::icon
  as_iconhash
- dpp::utility::icon
  as_iconhash
- dpp::utility::icon
  as_iconhash
- dpp::utility::icon
  as_image_data
- dpp::utility::icon
  as_image_data
- dpp::utility::icon
  as_image_data
- dpp::utility::icon
  hash_or_data
- dpp::utility::icon
  is_iconhash
- dpp::utility::icon
  is_image_data
- dpp::utility::icon
  operator=
- dpp::utility::icon
  operator=
- dpp::utility::icon
  operator=
- dpp::utility::icon
  operator=