Trait TableData

Source
pub trait TableData: Sealed {
    const TYPE_ID: FieldTypeId;

    // Required method
    fn to_data(&self) -> ss_plugin_state_data;
}
Expand description

§A trait describing types usable as table keys and values

Required Associated Constants§

Source

const TYPE_ID: FieldTypeId

The Falco plugin type id of the data

Required Methods§

Source

fn to_data(&self) -> ss_plugin_state_data

§Convert to the raw FFI representation

Note: even though the signature specifies an owned value, this value technically still borrows from self, as it contains raw pointers (for string values)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl TableData for i8

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::I8

Source§

fn to_data(&self) -> ss_plugin_state_data

Source§

impl TableData for i16

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::I16

Source§

fn to_data(&self) -> ss_plugin_state_data

Source§

impl TableData for i32

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::I32

Source§

fn to_data(&self) -> ss_plugin_state_data

Source§

impl TableData for i64

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::I64

Source§

fn to_data(&self) -> ss_plugin_state_data

Source§

impl TableData for u8

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::U8

Source§

fn to_data(&self) -> ss_plugin_state_data

Source§

impl TableData for u16

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::U16

Source§

fn to_data(&self) -> ss_plugin_state_data

Source§

impl TableData for u32

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::U32

Source§

fn to_data(&self) -> ss_plugin_state_data

Source§

impl TableData for u64

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::U64

Source§

fn to_data(&self) -> ss_plugin_state_data

Source§

impl TableData for CString

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::String

Source§

fn to_data(&self) -> ss_plugin_state_data

Source§

impl TableData for CStr

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::String

Source§

fn to_data(&self) -> ss_plugin_state_data

Implementors§

Source§

impl TableData for Bool

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::Bool

Source§

impl<K, E, M> TableData for Table<K, E, M>

Source§

const TYPE_ID: FieldTypeId = FieldTypeId::Table