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) More...
#include "utility.h"
Public Member Functions | |
| iconhash & | as_iconhash () & |
| Get as icon hash. More... | |
| iconhash && | as_iconhash () && |
| Get as icon hash. More... | |
| const iconhash & | as_iconhash () const & |
| Get as icon hash. More... | |
| image_data & | as_image_data () & |
| Get as image data. More... | |
| image_data && | as_image_data () && |
| Get as image. More... | |
| const image_data & | as_image_data () const & |
| Get as image. More... | |
| bool | is_iconhash () const |
| Check whether this icon is stored as an iconhash. More... | |
| bool | is_image_data () const |
| Check whether this icon is stored as an image. More... | |
| icon & | operator= (const iconhash &hash) |
| Assign to iconhash. More... | |
| icon & | operator= (const image_data &img) |
| Assign to image. More... | |
| icon & | operator= (iconhash &&hash) noexcept |
| Assign to iconhash. More... | |
| icon & | operator= (image_data &&img) noexcept |
| Assign to image. More... | |
Public Attributes | |
| std::variant< std::monostate, iconhash, image_data > | hash_or_data |
| Iconhash received or image data for upload. More... | |
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)
| iconhash && dpp::utility::icon::as_iconhash | ( | ) | & |
Get as icon hash.
is_iconhash() == false Referenced by dpp::guild::connect_member_voice(), and dpp::role::get_members().
| iconhash&& dpp::utility::icon::as_iconhash | ( | ) | && |
Get as icon hash.
is_iconhash() == false | const iconhash& dpp::utility::icon::as_iconhash | ( | ) | const & |
Get as icon hash.
is_iconhash() == false | image_data && dpp::utility::icon::as_image_data | ( | ) | & |
Get as image data.
is_image_data() == false | image_data&& dpp::utility::icon::as_image_data | ( | ) | && |
Get as image.
is_image_data() == false | const image_data& dpp::utility::icon::as_image_data | ( | ) | const & |
Get as image.
is_image_data() == false | bool dpp::utility::icon::is_iconhash | ( | ) | const |
Check whether this icon is stored as an iconhash.
References hash_or_data.
Referenced by dpp::role::get_members().
| bool dpp::utility::icon::is_image_data | ( | ) | const |
Check whether this icon is stored as an image.
References hash_or_data.
Assign to iconhash.
| hash | Iconhash |
References dpp::hash(), and hash_or_data.
| icon & dpp::utility::icon::operator= | ( | const image_data & | img | ) |
Assign to iconhash.
| hash | Iconhash |
References dpp::hash().
|
noexcept |
Assign to image.
| img | Image |
| std::variant<std::monostate, iconhash, image_data> dpp::utility::icon::hash_or_data |
Iconhash received or image data for upload.
Referenced by is_iconhash(), is_image_data(), and operator=().