pub struct TableId { /* private fields */ }Expand description
Composite key for system.tables entries: (namespace_id, table_name)
This composite key provides type-safe access to table metadata, ensuring namespace and table name are always paired correctly.
§Serialization
Serializes as “namespace.table” string format for JSON compatibility.
For example: "flush_test_ns_mkav1q2g_3.metrics"
Implementations§
Source§impl TableId
impl TableId
Sourcepub fn new(namespace_id: NamespaceId, table_name: TableName) -> TableId
pub fn new(namespace_id: NamespaceId, table_name: TableName) -> TableId
Create a new TableId from namespace ID and table name
Sourcepub fn namespace_id(&self) -> &NamespaceId
pub fn namespace_id(&self) -> &NamespaceId
Get the namespace ID component
Sourcepub fn table_name(&self) -> &TableName
pub fn table_name(&self) -> &TableName
Get the table name component
Sourcepub fn from_strings(namespace_id: &str, table_name: &str) -> TableId
pub fn from_strings(namespace_id: &str, table_name: &str) -> TableId
Create from string components
Sourcepub fn try_from_strings(
namespace_id: &str,
table_name: &str,
) -> Result<TableId, String>
pub fn try_from_strings( namespace_id: &str, table_name: &str, ) -> Result<TableId, String>
Create from string components with validation errors instead of panics.
Sourcepub fn into_parts(self) -> (NamespaceId, TableName)
pub fn into_parts(self) -> (NamespaceId, TableName)
Consume and return inner components
Trait Implementations§
Source§impl AsRef<[u8]> for TableId
Implement AsRef<u8> for EntityStore compatibility
impl AsRef<[u8]> for TableId
Implement AsRef<u8> for EntityStore compatibility
This allocates a new Vec on each call. For performance-critical paths, consider using as_storage_key() directly instead.
Source§impl<'de> Deserialize<'de> for TableId
impl<'de> Deserialize<'de> for TableId
Source§fn deserialize<D>(
deserializer: D,
) -> Result<TableId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<TableId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TableId
Source§impl Serialize for TableId
impl Serialize for TableId
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TableId
Auto Trait Implementations§
impl Freeze for TableId
impl RefUnwindSafe for TableId
impl Send for TableId
impl Sync for TableId
impl Unpin for TableId
impl UnsafeUnpin for TableId
impl UnwindSafe for TableId
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
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<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)