pub enum EntityType {
Show 13 variants
Concept,
Date,
Dashboard,
Decision,
File,
Incident,
IssueTracker,
Location,
Memory,
Organization,
Person,
Project,
Tool,
}Expand description
The 13 canonical graph entity classifications.
Values are serialized as lowercase strings ("person", "organization",
etc.) matching the pre-enum wire format and the SQLite type column.
Variants§
Concept
Date
Dashboard
Decision
File
Incident
IssueTracker
Location
Memory
Organization
Person
Project
Tool
Implementations§
Source§impl EntityType
impl EntityType
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Returns the canonical lowercase string representation stored in SQLite.
Sourcepub fn map_to_canonical(s: &str) -> EntityType
pub fn map_to_canonical(s: &str) -> EntityType
Maps an arbitrary type label to the closest canonical EntityType,
never failing (GAP-SG-47).
LLM extraction routinely emits type labels outside the 13 canonical
kinds (platform, language, feature, framework, …). The old
parse path discarded those entities with a WARN, silently losing
legitimate graph nodes. This function PRESERVES them by folding each
label onto the nearest canonical kind. Anything it cannot place falls
back to EntityType::Concept, the most general kind — so a label is
never dropped.
Matching is case-insensitive and treats hyphens as underscores, so
"Issue-Tracker" resolves to EntityType::IssueTracker.
Trait Implementations§
Source§impl Clone for EntityType
impl Clone for EntityType
Source§fn clone(&self) -> EntityType
fn clone(&self) -> EntityType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EntityType
Source§impl Debug for EntityType
impl Debug for EntityType
Source§impl<'de> Deserialize<'de> for EntityType
impl<'de> Deserialize<'de> for EntityType
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>,
Source§impl Display for EntityType
impl Display for EntityType
impl Eq for EntityType
Source§impl FromSql for EntityType
impl FromSql for EntityType
Source§fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Source§impl FromStr for EntityType
impl FromStr for EntityType
Source§impl Hash for EntityType
impl Hash for EntityType
Source§impl PartialEq for EntityType
impl PartialEq for EntityType
Source§fn eq(&self, other: &EntityType) -> bool
fn eq(&self, other: &EntityType) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for EntityType
impl Serialize for EntityType
impl StructuralPartialEq for EntityType
Source§impl ToSql for EntityType
impl ToSql for EntityType
Source§fn to_sql(&self) -> Result<ToSqlOutput<'_>>
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Source§impl ValueEnum for EntityType
impl ValueEnum for EntityType
Auto Trait Implementations§
impl Freeze for EntityType
impl RefUnwindSafe for EntityType
impl Send for EntityType
impl Sync for EntityType
impl Unpin for EntityType
impl UnsafeUnpin for EntityType
impl UnwindSafe for EntityType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SqlFnOutput for Twhere
T: ToSql,
impl<T> SqlFnOutput for Twhere
T: ToSql,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.