Trait native_windows_gui::custom::ResourceT [] [src]

pub trait ResourceT<ID: Clone + Hash> {
    fn type_id(&self) -> TypeId;
    fn build(&self, ui: &Ui<ID>) -> Result<Box<Resource>, Error>;
}

Structures implementing this trait can be used by a Ui to build a Resource

Required Methods

Should return the TypeId of the generated resource. For example a FontT struct returns the TypeId of a Font struct.

Should instance the resource and return it as a Box. If an error is raised, it will be returned by ui.commit.

Implementors