pub struct SemanticData {
pub sub_kinds: BTreeSet<SemanticSubKind>,
pub label: Option<String>,
pub predicate: Option<String>,
pub statements: Vec<SemanticStatement>,
}Fields§
§sub_kinds: BTreeSet<SemanticSubKind>Compatibility aggregate: kept during the bucket migration so existing readers can keep asking the pair-local edge what semantic kinds it carries. The statement list below is the durable truth.
label: Option<String>Compatibility aggregate over the statement labels.
predicate: Option<String>Open predicate IRI (the statements-over-schema substrate, linked-data
plan Phase 0). None when the edge’s meaning is fully carried by
sub_kinds; a canonical IRI (predicate_iri) for a recognized
predicate, or a raw IRI for an unrecognized one. sub_kinds stays
authoritative for behaviour; predicate carries identity + round-trip.
During the statement-bucket migration this is a compatibility view over
the statement predicates, not the durable truth.
statements: Vec<SemanticStatement>The durable semantic facts carried between one node pair.
Implementations§
Source§impl SemanticData
impl SemanticData
pub fn statements(&self) -> &[SemanticStatement]
Sourcepub fn assert_statement(
&mut self,
spec: SemanticStatementSpec,
) -> StatementAssert
pub fn assert_statement( &mut self, spec: SemanticStatementSpec, ) -> StatementAssert
Statement-aware assert: content-dedup on
(recognized_sub_kind, predicate, graph_scope) (same key as
insert_statement), updating the deduped
statement’s metadata in place; a miss mints a device-safe id and
appends. Always returns the fact handle.
Sourcepub fn retract_statement(&mut self, statement_id: &str) -> bool
pub fn retract_statement(&mut self, statement_id: &str) -> bool
Precise retract by fact handle. Bucket-local linear scan by design (buckets stay small; a global id index waits for evidence). Returns whether a statement was removed.
pub fn insert_statement( &mut self, recognized_sub_kind: Option<SemanticSubKind>, predicate: String, label: Option<String>, graph_scope: GraphScope, provenance_iri: Option<String>, asserted_at_ms: Option<u64>, ) -> bool
pub fn push_persisted_statement(&mut self, statement: SemanticStatement) -> bool
pub fn remove_statements_with_sub_kind( &mut self, sub_kind: SemanticSubKind, ) -> bool
pub fn set_statement_predicate(&mut self, predicate: Option<String>)
Trait Implementations§
Source§impl Archive for SemanticData
impl Archive for SemanticData
Source§const COPY_OPTIMIZATION: CopyOptimization<Self>
const COPY_OPTIMIZATION: CopyOptimization<Self>
serialize. Read moreSource§type Archived = ArchivedSemanticData
type Archived = ArchivedSemanticData
Source§type Resolver = SemanticDataResolver
type Resolver = SemanticDataResolver
Source§impl Clone for SemanticData
impl Clone for SemanticData
Source§impl Debug for SemanticData
impl Debug for SemanticData
Source§impl Default for SemanticData
impl Default for SemanticData
Source§impl<__D: Fallible + ?Sized> Deserialize<SemanticData, __D> for Archived<SemanticData>where
BTreeSet<SemanticSubKind>: Archive,
<BTreeSet<SemanticSubKind> as Archive>::Archived: Deserialize<BTreeSet<SemanticSubKind>, __D>,
Option<String>: Archive,
<Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,
Vec<SemanticStatement>: Archive,
<Vec<SemanticStatement> as Archive>::Archived: Deserialize<Vec<SemanticStatement>, __D>,
impl<__D: Fallible + ?Sized> Deserialize<SemanticData, __D> for Archived<SemanticData>where
BTreeSet<SemanticSubKind>: Archive,
<BTreeSet<SemanticSubKind> as Archive>::Archived: Deserialize<BTreeSet<SemanticSubKind>, __D>,
Option<String>: Archive,
<Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,
Vec<SemanticStatement>: Archive,
<Vec<SemanticStatement> as Archive>::Archived: Deserialize<Vec<SemanticStatement>, __D>,
Source§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<SemanticData, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<SemanticData, <__D as Fallible>::Error>
impl Eq for SemanticData
Source§impl PartialEq for SemanticData
impl PartialEq for SemanticData
Source§impl<__S: Fallible + ?Sized> Serialize<__S> for SemanticDatawhere
BTreeSet<SemanticSubKind>: Serialize<__S>,
Option<String>: Serialize<__S>,
Vec<SemanticStatement>: Serialize<__S>,
impl<__S: Fallible + ?Sized> Serialize<__S> for SemanticDatawhere
BTreeSet<SemanticSubKind>: Serialize<__S>,
Option<String>: Serialize<__S>,
Vec<SemanticStatement>: Serialize<__S>,
impl StructuralPartialEq for SemanticData
Auto Trait Implementations§
impl Freeze for SemanticData
impl RefUnwindSafe for SemanticData
impl Send for SemanticData
impl Sync for SemanticData
impl Unpin for SemanticData
impl UnsafeUnpin for SemanticData
impl UnwindSafe for SemanticData
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.