LogixType

Trait LogixType 

Source
pub trait LogixType: Sized {
    // Required methods
    fn descriptor() -> &'static LogixTypeDescriptor;
    fn default_value() -> Option<Self>;
    fn logix_parse<FS: LogixVfs>(
        p: &mut LogixParser<'_, '_, FS>,
    ) -> Result<Value<Self>>;
}
Expand description

This trait is used to represent types that can be stored in a logix config.

Required Methods§

Source

fn descriptor() -> &'static LogixTypeDescriptor

A description of the type, intended used for documentation and auto-completion

Source

fn default_value() -> Option<Self>

If the value is optional, this returns Some

Source

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Parse the value from the given parser state

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 LogixType for i8

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl LogixType for i16

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl LogixType for i32

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl LogixType for i64

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl LogixType for u8

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl LogixType for u16

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl LogixType for u32

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl LogixType for u64

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl LogixType for String

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl LogixType for PathBuf

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl<T: LogixType> LogixType for Option<T>

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl<T: LogixType> LogixType for Vec<T>

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Source§

impl<const SIZE: usize, T: LogixType> LogixType for [T; SIZE]

Source§

fn descriptor() -> &'static LogixTypeDescriptor

Source§

fn default_value() -> Option<Self>

Source§

fn logix_parse<FS: LogixVfs>( p: &mut LogixParser<'_, '_, FS>, ) -> Result<Value<Self>>

Implementors§