falco_plugin/tables/import/
runtime.rs1use crate::tables::import::entry::Entry;
2use crate::tables::import::table::raw::RawTable;
3use crate::tables::import::traits::TableMetadata;
4use crate::tables::TablesInput;
5use std::marker::PhantomData;
6
7pub type RuntimeEntry<T> = Entry<NoMetadata<T>>;
12
13#[derive(Debug)]
14pub struct NoMetadata<T> {
15 tag: PhantomData<T>,
16}
17
18impl<T> Clone for NoMetadata<T> {
19 fn clone(&self) -> Self {
20 Self { tag: PhantomData }
21 }
22}
23
24impl<T> TableMetadata for NoMetadata<T> {
25 fn new(_raw_table: &RawTable, _tables_input: &TablesInput) -> Result<Self, anyhow::Error> {
26 Ok(Self { tag: PhantomData })
27 }
28}
29
30impl<'a, T, U> From<&'a NoMetadata<T>> for NoMetadata<U> {
31 fn from(_value: &'a NoMetadata<T>) -> Self {
32 Self { tag: PhantomData }
33 }
34}
35
36impl<'a, T> From<&'a NoMetadata<T>> for () {
37 fn from(_value: &'a NoMetadata<T>) -> Self {}
38}