pub struct RawRecord {
pub record_type: String,
pub record_name: String,
pub fields: BTreeMap<String, FieldValue>,
pub modified_ms: Option<i64>,
pub created_ms: Option<i64>,
pub change_tag: Option<String>,
}Fields§
§record_type: String§record_name: String§fields: BTreeMap<String, FieldValue>§modified_ms: Option<i64>Server modification date, when the transport knows it (decode fallback).
created_ms: Option<i64>Server creation date, when the transport knows it (decode fallback).
change_tag: Option<String>Opaque server change tag. Reusing a fetched record keeps it, so updates modify instead of colliding as false inserts.
Implementations§
Source§impl RawRecord
impl RawRecord
pub fn new(record_type: &str, record_name: &str) -> Self
pub fn get(&self, key: &str) -> Option<&FieldValue>
pub fn text(&self, key: &str) -> Option<String>
pub fn date_ms(&self, key: &str) -> Option<i64>
pub fn set(&mut self, key: &str, value: FieldValue)
Sourcepub fn set_opt(&mut self, key: &str, value: Option<FieldValue>)
pub fn set_opt(&mut self, key: &str, value: Option<FieldValue>)
Set when Some, clear when None (.allKeys semantics).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RawRecord
impl<'de> Deserialize<'de> for RawRecord
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&RawRecord> for WireRecord
impl From<&RawRecord> for WireRecord
impl StructuralPartialEq for RawRecord
Auto Trait Implementations§
impl Forget for RawRecord
impl Freeze for RawRecord
impl Move for RawRecord
impl RefUnwindSafe for RawRecord
impl Send for RawRecord
impl Sync for RawRecord
impl Unpin for RawRecord
impl UnsafeUnpin for RawRecord
impl UnwindSafe for RawRecord
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