---
source: crates/aviutl2-macros/src/filter_config_items.rs
expression: "rustfmt_wrapper::rustfmt(output).unwrap()"
---
struct Config {
    int_color: u32,
    str_color: u32,
    tuple_color: u32,
}
#[automatically_derived]
impl ::aviutl2::filter::FilterConfigItems for Config {
    fn to_config_items() -> Vec<::aviutl2::filter::FilterConfigItem> {
        return vec![
            ::aviutl2::filter::FilterConfigItem::Color(::aviutl2::filter::FilterConfigColor {
                name: "IntColor".to_string(),
                value: 16711935u32.into(),
            }),
            ::aviutl2::filter::FilterConfigItem::Color(::aviutl2::filter::FilterConfigColor {
                name: "StrColor".to_string(),
                value: 65280u32.into(),
            }),
            ::aviutl2::filter::FilterConfigItem::Color(::aviutl2::filter::FilterConfigColor {
                name: "TupleColor".to_string(),
                value: 16711680u32.into(),
            }),
        ];
    }
    fn from_config_items(items: &[::aviutl2::filter::FilterConfigItem]) -> Self {
        Self {
            int_color: match items[0usize] {
                ::aviutl2::filter::FilterConfigItem::Color(ref color) => color.value.into(),
                _ => panic!("expected Color at index {}", 0usize),
            },
            str_color: match items[1usize] {
                ::aviutl2::filter::FilterConfigItem::Color(ref color) => color.value.into(),
                _ => panic!("expected Color at index {}", 1usize),
            },
            tuple_color: match items[2usize] {
                ::aviutl2::filter::FilterConfigItem::Color(ref color) => color.value.into(),
                _ => panic!("expected Color at index {}", 2usize),
            },
        }
    }
}
#[automatically_derived]
impl ::std::default::Default for Config {
    fn default() -> Self {
        Self {
            int_color: 16711935u32.into(),
            str_color: 65280u32.into(),
            tuple_color: 16711680u32.into(),
        }
    }
}
