pub struct Atom { /* private fields */ }Expand description
Immutable atom record.
Atoms are constructed once and never mutated; updates are represented by new atoms
referencing older atoms through links.
Implementations§
Source§impl Atom
impl Atom
pub fn new( id: AtomId, world: WorldKey, worker: WorkerKey, kind: AtomKind, timestamp: Timestamp, importance: Importance, payload_json: impl Into<String>, vector: Option<Vec<f32>>, flags: Vec<String>, labels: Vec<String>, links: Vec<Link>, ) -> Self
pub fn builder( id: AtomId, world: WorldKey, worker: WorkerKey, kind: AtomKind, timestamp: Timestamp, importance: Importance, payload_json: impl Into<String>, ) -> AtomBuilder
pub fn id(&self) -> &AtomId
pub fn world(&self) -> &WorldKey
pub fn worker(&self) -> &WorkerKey
pub fn kind(&self) -> &AtomKind
pub fn timestamp(&self) -> &Timestamp
pub fn importance(&self) -> Importance
pub fn payload_json(&self) -> &str
pub fn vector(&self) -> Option<&[f32]>
pub fn flags(&self) -> &[String]
pub fn labels(&self) -> &[String]
pub fn links(&self) -> &[Link]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Atom
impl<'de> Deserialize<'de> for Atom
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
impl StructuralPartialEq for Atom
Auto Trait Implementations§
impl Freeze for Atom
impl RefUnwindSafe for Atom
impl Send for Atom
impl Sync for Atom
impl Unpin for Atom
impl UnwindSafe for Atom
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