#[non_exhaustive]pub enum SearchInventoryResultItem {
AssetItem(AssetItem),
DataProductItem(DataProductSummary),
GlossaryItem(GlossaryItem),
GlossaryTermItem(GlossaryTermItem),
Unknown,
}
Expand description
The details of the search results.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AssetItem(AssetItem)
The asset item included in the search results.
DataProductItem(DataProductSummary)
The data product item included in the search results.
GlossaryItem(GlossaryItem)
The glossary item included in the search results.
GlossaryTermItem(GlossaryTermItem)
The glossary term item included in the search results.
Unknown
The Unknown
variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
An unknown enum variant
Note: If you encounter this error, consider upgrading your SDK to the latest version.
The Unknown
variant represents cases where the server sent a value that wasn’t recognized
by the client. This can happen when the server adds new functionality, but the client has not been updated.
To investigate this, consider turning on debug logging to print the raw HTTP response.
Implementations§
source§impl SearchInventoryResultItem
impl SearchInventoryResultItem
sourcepub fn as_asset_item(&self) -> Result<&AssetItem, &Self>
pub fn as_asset_item(&self) -> Result<&AssetItem, &Self>
sourcepub fn is_asset_item(&self) -> bool
pub fn is_asset_item(&self) -> bool
Returns true if this is a AssetItem
.
sourcepub fn as_data_product_item(&self) -> Result<&DataProductSummary, &Self>
pub fn as_data_product_item(&self) -> Result<&DataProductSummary, &Self>
Tries to convert the enum instance into DataProductItem
, extracting the inner DataProductSummary
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_data_product_item(&self) -> bool
pub fn is_data_product_item(&self) -> bool
Returns true if this is a DataProductItem
.
sourcepub fn as_glossary_item(&self) -> Result<&GlossaryItem, &Self>
pub fn as_glossary_item(&self) -> Result<&GlossaryItem, &Self>
Tries to convert the enum instance into GlossaryItem
, extracting the inner GlossaryItem
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_glossary_item(&self) -> bool
pub fn is_glossary_item(&self) -> bool
Returns true if this is a GlossaryItem
.
sourcepub fn as_glossary_term_item(&self) -> Result<&GlossaryTermItem, &Self>
pub fn as_glossary_term_item(&self) -> Result<&GlossaryTermItem, &Self>
Tries to convert the enum instance into GlossaryTermItem
, extracting the inner GlossaryTermItem
.
Returns Err(&Self)
if it can’t be converted.
sourcepub fn is_glossary_term_item(&self) -> bool
pub fn is_glossary_term_item(&self) -> bool
Returns true if this is a GlossaryTermItem
.
sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true if the enum instance is the Unknown
variant.
Trait Implementations§
source§impl Clone for SearchInventoryResultItem
impl Clone for SearchInventoryResultItem
source§fn clone(&self) -> SearchInventoryResultItem
fn clone(&self) -> SearchInventoryResultItem
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SearchInventoryResultItem
impl Debug for SearchInventoryResultItem
source§impl PartialEq for SearchInventoryResultItem
impl PartialEq for SearchInventoryResultItem
source§fn eq(&self, other: &SearchInventoryResultItem) -> bool
fn eq(&self, other: &SearchInventoryResultItem) -> bool
self
and other
values to be equal, and is used
by ==
.