#[non_exhaustive]pub enum DocumentAttributeValue {
DateValue(DateTime),
LongValue(i64),
StringListValue(Vec<String>),
StringValue(String),
Unknown,
}Expand description
The value of a document attribute. You can only provide one value for a document attribute.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DateValue(DateTime)
A date expressed as an ISO 8601 string.
It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time.
LongValue(i64)
A long integer value.
StringListValue(Vec<String>)
A list of strings.
StringValue(String)
A string.
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 DocumentAttributeValue
impl DocumentAttributeValue
sourcepub fn as_date_value(&self) -> Result<&DateTime, &Self>
pub fn as_date_value(&self) -> Result<&DateTime, &Self>
sourcepub fn is_date_value(&self) -> bool
pub fn is_date_value(&self) -> bool
Returns true if this is a DateValue.
sourcepub fn as_long_value(&self) -> Result<&i64, &Self>
pub fn as_long_value(&self) -> Result<&i64, &Self>
sourcepub fn is_long_value(&self) -> bool
pub fn is_long_value(&self) -> bool
Returns true if this is a LongValue.
sourcepub fn as_string_list_value(&self) -> Result<&Vec<String>, &Self>
pub fn as_string_list_value(&self) -> Result<&Vec<String>, &Self>
Tries to convert the enum instance into StringListValue, extracting the inner Vec.
Returns Err(&Self) if it can’t be converted.
sourcepub fn is_string_list_value(&self) -> bool
pub fn is_string_list_value(&self) -> bool
Returns true if this is a StringListValue.
sourcepub fn as_string_value(&self) -> Result<&String, &Self>
pub fn as_string_value(&self) -> Result<&String, &Self>
Tries to convert the enum instance into StringValue, extracting the inner String.
Returns Err(&Self) if it can’t be converted.
sourcepub fn is_string_value(&self) -> bool
pub fn is_string_value(&self) -> bool
Returns true if this is a StringValue.
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 DocumentAttributeValue
impl Clone for DocumentAttributeValue
source§fn clone(&self) -> DocumentAttributeValue
fn clone(&self) -> DocumentAttributeValue
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for DocumentAttributeValue
impl Debug for DocumentAttributeValue
source§impl PartialEq for DocumentAttributeValue
impl PartialEq for DocumentAttributeValue
source§fn eq(&self, other: &DocumentAttributeValue) -> bool
fn eq(&self, other: &DocumentAttributeValue) -> bool
self and other values to be equal, and is used
by ==.