#[non_exhaustive]pub enum SearchInventoryResultItem {
AssetItem(AssetItem),
DataProductItem(DataProductResultItem),
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(DataProductResultItem)
The data product.
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<&DataProductResultItem, &Self>
pub fn as_data_product_item(&self) -> Result<&DataProductResultItem, &Self>
Tries to convert the enum instance into DataProductItem
, extracting the inner DataProductResultItem
.
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
impl StructuralPartialEq for SearchInventoryResultItem
Auto Trait Implementations§
impl Freeze for SearchInventoryResultItem
impl RefUnwindSafe for SearchInventoryResultItem
impl Send for SearchInventoryResultItem
impl Sync for SearchInventoryResultItem
impl Unpin for SearchInventoryResultItem
impl UnwindSafe for SearchInventoryResultItem
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more