pub struct Generator { /* private fields */ }Expand description
Icon code generator
Implementations§
Source§impl Generator
impl Generator
Sourcepub fn new(icons_dir: PathBuf) -> Self
pub fn new(icons_dir: PathBuf) -> Self
Create a new generator with the specified icons directory
Sourcepub fn list_icons(&self) -> Result<BTreeMap<String, Vec<String>>>
pub fn list_icons(&self) -> Result<BTreeMap<String, Vec<String>>>
List all generated icons grouped by collection
Sourcepub fn get_all_icon_identifiers(&self) -> Result<Vec<String>>
pub fn get_all_icon_identifiers(&self) -> Result<Vec<String>>
Get all icon identifiers from generated files
Sourcepub fn init(&self) -> Result<()>
pub fn init(&self) -> Result<()>
Initialize the icons directory with mod.rs if it doesn’t exist
Sourcepub fn add_icons(&self, icons: &[(IconIdentifier, IconifyIcon)]) -> Result<()>
pub fn add_icons(&self, icons: &[(IconIdentifier, IconifyIcon)]) -> Result<()>
Add icons to the generated code
Sourcepub fn regenerate_mod_rs(&self) -> Result<()>
pub fn regenerate_mod_rs(&self) -> Result<()>
Regenerate mod.rs with the latest template This is useful for updating the Icon component definition after CLI updates
Auto Trait Implementations§
impl Freeze for Generator
impl RefUnwindSafe for Generator
impl Send for Generator
impl Sync for Generator
impl Unpin for Generator
impl UnwindSafe for Generator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more