pub struct AttributeAnyValue {
pub type: i32,
pub string_value: String,
pub bool_value: bool,
pub int_value: i64,
pub double_value: f64,
pub array_value: Option<AttributeArray>,
}Expand description
AttributeAnyValue is used to represent any type of attribute value. AttributeAnyValue may contain a primitive value such as a string or integer or it may contain an arbitrary nested object containing arrays, key-value lists and primitives.
Fields§
§type: i32We implement a union manually here because Go’s MessagePack generator does not support
Protobuf oneof unions: https://github.com/tinylib/msgp/issues/184
Despite this, the format represented here is binary compatible with oneof, if we choose
to migrate to that in the future.
@gotags: json:“type” msg:“type”
string_value: String@gotags: json:“string_value” msg:“string_value”
bool_value: bool@gotags: json:“bool_value” msg:“bool_value”
int_value: i64@gotags: json:“int_value” msg:“int_value”
double_value: f64@gotags: json:“double_value” msg:“double_value”
array_value: Option<AttributeArray>@gotags: json:“array_value” msg:“array_value”
Implementations§
Source§impl AttributeAnyValue
impl AttributeAnyValue
Sourcepub fn type(&self) -> AttributeAnyValueType
pub fn type(&self) -> AttributeAnyValueType
Returns the enum value of type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_type(&mut self, value: AttributeAnyValueType)
pub fn set_type(&mut self, value: AttributeAnyValueType)
Sets type to the provided enum value.
Trait Implementations§
Source§impl Clone for AttributeAnyValue
impl Clone for AttributeAnyValue
Source§fn clone(&self) -> AttributeAnyValue
fn clone(&self) -> AttributeAnyValue
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AttributeAnyValue
impl Debug for AttributeAnyValue
Source§impl Default for AttributeAnyValue
impl Default for AttributeAnyValue
Source§impl<'de> Deserialize<'de> for AttributeAnyValue
impl<'de> Deserialize<'de> for AttributeAnyValue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Message for AttributeAnyValue
impl Message for AttributeAnyValue
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.