MCPcopy Create free account
hub / github.com/elastic/devfiler / table_name

Function table_name

src/storage/table.rs:91–97  ·  view source on GitHub ↗

Derive the table name from the type name.

()

Source from the content-addressed store, hash-verified

89
90/// Derive the table name from the type name.
91fn table_name<T: ?Sized>() -> &'static str {
92 let full = std::any::type_name::<T>();
93 let name = full.rsplit_once("::").map(|x| x.1).unwrap();
94 assert!(name.chars().all(|c| c.is_ascii_alphanumeric()));
95 assert!(!name.is_empty());
96 name
97}
98
99// Make sure that `RawTable` remains object safe.
100#[allow(unused)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected