pub struct IconsCopyStrategy {
pub copy_node_rust: bool,
pub copy_all: bool,
pub path_node_rust: PathBuf,
pub force_copy: bool,
}icons only.Expand description
How to copy the files needed for the icons to be displayed.
Fields§
§copy_node_rust: boolfind_icons only.Whether or not to copy the NodeRust file. Available with “find_icons” feature.
copy_all: boolWhether or not to copy all the NodeRust files.
path_node_rust: PathBufPath to the folder where the icon will be copied relative to the crate folder.
force_copy: boolWhether or not to copy if the files already exist.
Implementations§
Source§impl IconsCopyStrategy
impl IconsCopyStrategy
Sourcepub fn new(
copy_node_rust: bool,
copy_all: bool,
path_node_rust: PathBuf,
force_copy: bool,
) -> Self
pub fn new( copy_node_rust: bool, copy_all: bool, path_node_rust: PathBuf, force_copy: bool, ) -> Self
Creates a new instance of IconsCopyStrategy, by giving it all its fields.
§Parameters
copy_node_rust- Whether or not to copy the NodeRust.svg file. Available with “find_icons” feature.copy_all- Whether or not to copy all theNodeRustfiles.path_node_rust- Path to the icon copied relative to the crate folder.force_copy- Whether or not to copy if the files already exist.
§Returns
The IconsCopyStrategy instancte with its fields initialized.
Sourcepub fn copying_node_rust(self) -> Self
Available on crate feature find_icons only.
pub fn copying_node_rust(self) -> Self
find_icons only.Changes the copy_node_rust field to true and returns the same struct.
§Returns
The same IconsCopyStrategy it was passed to it with copy_node_rust set to true.
Sourcepub fn with_path_node_rust(self, path_node_rust: PathBuf) -> Self
pub fn with_path_node_rust(self, path_node_rust: PathBuf) -> Self
Changes the path_node_rust field to the one indicated and returns the same struct.
§Parameters
path_node_rust- Path to the icon copied relative to the crate folder.
§Returns
The same IconsCopyStrategy it was passed to it with path_node_rust set to one passed by parameter.
Sourcepub fn copying_all(self) -> Self
pub fn copying_all(self) -> Self
Changes the copy_all field to true and returns the same struct.
§Returns
The same IconsCopyStrategy it was passed to it with copy_node_rust set to true.
Sourcepub fn forcing_copy(self) -> Self
pub fn forcing_copy(self) -> Self
Changes the force_copy field to true and returns the same struct.
§Returns
The same IconsCopyStrategy it was passed to it with force_copy set to true.