pub struct Labelflair {}Expand description
Generate a colorful palette of labels for your GitHub Issues
This struct provides the high-level interface to convert a configuration into a list of labels
for GitHub Issues. Its generate method takes a configuration and expands it into a list of
labels that can be serialized for use with GitHub’s API.
Implementations§
Source§impl Labelflair
impl Labelflair
Sourcepub fn generate(config: &ConfigV1) -> Vec<Label>
pub fn generate(config: &ConfigV1) -> Vec<Label>
Generate a list of GitHub Issues labels from the configuration
This function takes a configuration and generates a list of labels based on the groups defined in the configuration.
Given this configuration:
[[group]]
prefix = "C-"
colors = { tailwind = "red" }
labels = ["bug", "feature"]It will generate the following labels:
- name: C-bug
color: '#fca5a5'
- name: C-feature
color: '#b91c1c'Trait Implementations§
Source§impl Clone for Labelflair
impl Clone for Labelflair
Source§fn clone(&self) -> Labelflair
fn clone(&self) -> Labelflair
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Labelflair
impl Debug for Labelflair
Source§impl Default for Labelflair
impl Default for Labelflair
Source§fn default() -> Labelflair
fn default() -> Labelflair
Returns the “default value” for a type. Read more
Source§impl Hash for Labelflair
impl Hash for Labelflair
Source§impl Ord for Labelflair
impl Ord for Labelflair
Source§fn cmp(&self, other: &Labelflair) -> Ordering
fn cmp(&self, other: &Labelflair) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Labelflair
impl PartialEq for Labelflair
Source§impl PartialOrd for Labelflair
impl PartialOrd for Labelflair
impl Copy for Labelflair
impl Eq for Labelflair
impl StructuralPartialEq for Labelflair
Auto Trait Implementations§
impl Freeze for Labelflair
impl RefUnwindSafe for Labelflair
impl Send for Labelflair
impl Sync for Labelflair
impl Unpin for Labelflair
impl UnsafeUnpin for Labelflair
impl UnwindSafe for Labelflair
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