pub fn with_attribute<K, V>(mut self, key: K, value: V) -> Self
    where
        K: Into<Cow<'static, str>>,
        V: Into<Any>,
    {
        if let Some(ref mut map) = self.record.attributes {
            map.insert(key.into(), value.into());
        } else {
            self.record.attributes = Some(BTreeMap::from([(key.into(), value.into())]));
        }

        self
    }
/// Set a single attribute for this record
Set a single attribute for this record
Set a single attribute for this record
pub fn with_attribute<K, V>(mut self, key: K, value: V) -> Self
    where
        K: Into<Cow<'static, str>>,
        V: Into<Any>,
    {
        if let Some(ref mut map) = self.record.attributes {
            map.insert(key.into(), value.into());
        } else {
            self.record.attributes = Some(BTreeMap::from([(key.into(), value.into())]));
        }
        self
    }
pub fn with_attribute < K , V > ( mut self , key : K , value : V ) -> Self where K : Into < Cow < ' static , str > > , V : Into < Any > , { if let Some ( ref mut map ) = self . record . attributes { map . insert ( key . into ( ) , value . into ( ) ) ; } else { self . record . attributes = Some ( BTreeMap :: from ( [ ( key . into ( ) , value . into ( ) ) ] ) ) ; } self }
Set a single attribute for this record
Set a single attribute for this record
mut self
key
K
value
V
mut self
key
K
value
V