material-code-icons

Crates.iomaterial-code-icons
lib.rsmaterial-code-icons
version0.1.0
sourcesrc
created_at2022-12-26 15:32:29.462259
updated_at2022-12-26 15:32:29.462259
descriptionVS Code Material Icon Theme in Rust
homepage
repositoryhttps://github.com/sethbywater/material-code-icons
max_upload_size
id745811
size3,788,873
Seth Bywater (sethbywater)

documentation

https://docs.rs/material_code_icons

README

material-code-icons

This crate uses the icons from the VS Code Material Icon Theme and makes them available in your rust code.

The main point of interaction in this crate is code_icon(). It takes a file name, folder name, or file extension and returns an SVG as a &[u8].

let icon_from_file_name_extension = code_icon("lib.rs");
let icon_from_extension = code_icon("rs");
let icon_from_file_name = code_icon(".gitignore");
let icon_from_folder_name = code_icon("src");
let icon = material_code_icons::RUST;

Currently, this crate does not provide any other return types, and you need to deserialize the SVG with another crate, but if there is a popular SVG or image type in Rust then it is possible to add support for it if you open an issue.

Commit count: 11

cargo fmt