#[non_exhaustive]pub struct CustomAttribute {
pub text: Vec<String>,
pub numbers: Vec<f64>,
/* private fields */
}Available on crate features
recommendation-service or user-event-service only.Expand description
A custom attribute that is not explicitly modeled in a resource, e.g. UserEvent.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: Vec<String>The textual values of this custom attribute. For example, ["yellow", "green"] when the key is “color”.
Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is
returned.
Exactly one of
CustomAttribute.text
or
CustomAttribute.numbers
should be set. Otherwise, an INVALID_ARGUMENT error is returned.
numbers: Vec<f64>The numerical values of this custom attribute. For example, [2.3, 15.4]
when the key is “lengths_cm”.
Exactly one of
CustomAttribute.text
or
CustomAttribute.numbers
should be set. Otherwise, an INVALID_ARGUMENT error is returned.
Implementations§
Source§impl CustomAttribute
impl CustomAttribute
Trait Implementations§
Source§impl Clone for CustomAttribute
impl Clone for CustomAttribute
Source§fn clone(&self) -> CustomAttribute
fn clone(&self) -> CustomAttribute
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CustomAttribute
impl Debug for CustomAttribute
Source§impl Default for CustomAttribute
impl Default for CustomAttribute
Source§fn default() -> CustomAttribute
fn default() -> CustomAttribute
Returns the “default value” for a type. Read more
Source§impl Message for CustomAttribute
impl Message for CustomAttribute
Source§impl PartialEq for CustomAttribute
impl PartialEq for CustomAttribute
impl StructuralPartialEq for CustomAttribute
Auto Trait Implementations§
impl Freeze for CustomAttribute
impl RefUnwindSafe for CustomAttribute
impl Send for CustomAttribute
impl Sync for CustomAttribute
impl Unpin for CustomAttribute
impl UnwindSafe for CustomAttribute
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
Mutably borrows from an owned value. Read more