pub struct Note {
pub id: Uuid,
pub namespace: String,
pub kind: String,
pub name: Option<String>,
pub content: String,
pub salience: f64,
pub decay_factor: f64,
pub expires_at: Option<i64>,
pub properties: Option<Value>,
pub created_at: i64,
pub updated_at: i64,
pub deleted_at: Option<i64>,
}Expand description
A storage-level note record. Flat, SQL-friendly representation.
Fields§
§id: Uuid§namespace: String§kind: String§name: Option<String>§content: String§salience: f64§decay_factor: f64§expires_at: Option<i64>§properties: Option<Value>§created_at: i64§updated_at: i64§deleted_at: Option<i64>Implementations§
Source§impl Note
impl Note
pub fn new( namespace: impl Into<String>, kind: impl Into<String>, content: impl Into<String>, ) -> Self
pub fn with_name(self, n: impl Into<String>) -> Self
pub fn with_salience(self, s: f64) -> Self
pub fn with_decay(self, d: f64) -> Self
pub fn with_properties(self, p: Value) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Note
impl<'de> Deserialize<'de> for Note
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
Auto Trait Implementations§
impl Freeze for Note
impl RefUnwindSafe for Note
impl Send for Note
impl Sync for Note
impl Unpin for Note
impl UnsafeUnpin for Note
impl UnwindSafe for Note
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