pub struct Builder { /* private fields */ }Expand description
A builder for wl-client wrappers.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn wl_client_path(self, path: &str) -> Self
pub fn wl_client_path(self, path: &str) -> Self
Sets the rust module path to the wl-client crate.
By default, the generated code assumes that the wl-client crate is accessible
via ::wl_client.
Sourcepub fn xml_dir(self, path: impl AsRef<Path>) -> Self
pub fn xml_dir(self, path: impl AsRef<Path>) -> Self
Adds a protocol XML dir.
This behaves as if all XML files in this directory (but not in any
sub-directories) had been added with Builder::xml_file.
Sourcepub fn with_default_dir(self, default_dir: bool) -> Self
pub fn with_default_dir(self, default_dir: bool) -> Self
Enables or disables the default wayland-protocols dir.
By default, the builder will try to load XML files from the wayland-protocols
directory relative to the current working directory.
Sourcepub fn for_build_rs(self, build_rs: bool) -> Self
pub fn for_build_rs(self, build_rs: bool) -> Self
Enables or disables build.rs logic.
By default, the builder assumes that it is being used from build.rs. It will
emit cargo:: messages and treats a relative Builder::target_dir as relative
to $OUT_DIR.
Sourcepub fn target_dir(self, target_dir: impl AsRef<Path>) -> Self
pub fn target_dir(self, target_dir: impl AsRef<Path>) -> Self
The target directory into which to generate the mod.rs.
By default, the target directory is wayland-protocols.
If Builder::for_build_rs is enabled, then a relative target directory will be
interpreted relative to $OUT_DIR.
Sourcepub fn with_mutable_data(self, mutable_data: bool) -> Self
pub fn with_mutable_data(self, mutable_data: bool) -> Self
Enables or disables mutable data parameters.
This is disabled by default. If it is enabled, event handlers take an additional parameter that gives access to mutable data that was passed in when dispatching a queue.