IconsCopyStrategy

Struct IconsCopyStrategy 

Source
pub struct IconsCopyStrategy {
    pub copy_node_rust: bool,
    pub copy_all: bool,
    pub path_node_rust: PathBuf,
    pub force_copy: bool,
}
Available on crate feature icons only.
Expand description

How to copy the files needed for the icons to be displayed.

Fields§

§copy_node_rust: bool
Available on crate feature find_icons only.

Whether or not to copy the NodeRust file. Available with “find_icons” feature.

§copy_all: bool

Whether or not to copy all the NodeRust files.

§path_node_rust: PathBuf

Path to the folder where the icon will be copied relative to the crate folder.

§force_copy: bool

Whether or not to copy if the files already exist.

Implementations§

Source§

impl IconsCopyStrategy

Source

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 the NodeRust files.
  • 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.

Source

pub fn copying_node_rust(self) -> Self

Available on crate feature 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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Debug for IconsCopyStrategy

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IconsCopyStrategy

Source§

fn default() -> IconsCopyStrategy

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.