pub struct Binding {
pub subject: BindingEndpoint,
pub target: BindingEndpoint,
pub kind: Option<String>,
pub meta: Value,
}Expand description
Persisted relationship between graph-local content and a knowledge source anchor.
Fields§
§subject: BindingEndpointStable local endpoint inside this graph.
target: BindingEndpointStable target endpoint, usually an opaque host-owned source anchor.
kind: Option<String>Optional domain-specific relationship label.
meta: ValueArbitrary domain metadata.
Implementations§
Source§impl Binding
impl Binding
pub fn new(subject: BindingEndpoint, target: BindingEndpoint) -> Self
pub fn graph_local_to_source( subject: GraphLocalBindingTarget, source_id: impl Into<String>, payload: Value, ) -> Self
pub fn node_to_source( node: NodeId, source_id: impl Into<String>, payload: Value, ) -> Self
pub fn with_kind(self, kind: impl Into<String>) -> Self
pub fn with_meta(self, meta: Value) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Binding
impl<'de> Deserialize<'de> for Binding
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 Binding
Auto Trait Implementations§
impl Freeze for Binding
impl RefUnwindSafe for Binding
impl Send for Binding
impl Sync for Binding
impl Unpin for Binding
impl UnsafeUnpin for Binding
impl UnwindSafe for Binding
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