MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / from

Method from

graphlite/src/catalog/operations.rs:56–74  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

54
55impl From<&str> for EntityType {
56 fn from(s: &str) -> Self {
57 match s {
58 "schema" => EntityType::Schema,
59 "graph" => EntityType::Graph,
60 "graph_type" => EntityType::GraphType,
61 "vertex_type" => EntityType::VertexType,
62 "edge_type" => EntityType::EdgeType,
63 "index" => EntityType::Index,
64 "user" => EntityType::User,
65 "role" => EntityType::Role,
66 "ace" => EntityType::Ace,
67 "collection" => EntityType::Collection,
68 "metric" => EntityType::Metric,
69 "default_schema" => EntityType::DefaultSchema,
70 "store" => EntityType::Store,
71 "procedure" => EntityType::Procedure,
72 _ => EntityType::Schema, // default fallback
73 }
74 }
75}
76
77impl From<String> for EntityType {

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected