Trait logix_type::type_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

Object Safety§

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§