[][src]Struct woab::BuilderFactory

pub struct BuilderFactory(_);

Holds instructions for generating a GTK builder.

let builder_xml = r#"
    <interface>
      <requires lib="gtk+" version="3.22"/>
      <object class="GtkButton" id="my_button">
        ...
      </object>
    </interface>
"#;
let builder_factory: BuilderFactory = builder_xml.to_owned().into();
let builder = builder_factory.build();
let my_button: gtk::Button = builder.get_object("my_button").unwrap();

Refer to #[derive(woab::Factories)] for how to create instances of this struct.

Implementations

impl BuilderFactory[src]

pub fn build(&self) -> Builder[src]

Create a gtk::Builder from the instructions inside this factory.

Note that "creating a builder" means that the GTK widgets are created (but not yet shown)

Trait Implementations

impl From<String> for BuilderFactory[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,