pub struct LinkBody {
pub source: String,
pub target: String,
pub kind: String,
pub weight: f32,
}Expand description
POST /v1/links body — create/overwrite a directed edge between two memories.
Fields§
§source: String§target: String§kind: String§weight: f32[0, 1] for most kinds; [-1, 1] for contradicts. Defaults to 1.0.
Implementations§
Source§impl LinkBody
impl LinkBody
Sourcepub fn parts(
&self,
) -> Result<(WireMemoryId, WireMemoryId, EdgeKindWire, f32), String>
pub fn parts( &self, ) -> Result<(WireMemoryId, WireMemoryId, EdgeKindWire, f32), String>
Parse into (source, target, kind, weight).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LinkBody
impl<'de> Deserialize<'de> for LinkBody
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 LinkBody
impl RefUnwindSafe for LinkBody
impl Send for LinkBody
impl Sync for LinkBody
impl Unpin for LinkBody
impl UnsafeUnpin for LinkBody
impl UnwindSafe for LinkBody
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