Expand description
Automatic gtk::ListStore struct derive for Rust.
§Example
use gtk::prelude::*;
use gtk_liststore_item::ListStoreItem;
#[derive(ListStoreItem)]
struct Item {
name: String,
value: u32,
}
gtk::init().unwrap();
let mut list_store = Item::new_liststore();
let item = Item { name: "foobar".into(), value: 42 };
let iter = item.insert_into_liststore(&mut list_store);
let retrieved_item = Item::from_liststore_iter(&list_store, &iter).unwrap();
assert_eq!("foobar", retrieved_item.name);
assert_eq!(42, retrieved_item.value);Traits§
- List
Store Item - A trait to ease interraction with a ListStore using an intermediate struct.