pub struct Badge {
pub id: &'static str,
pub name: &'static str,
pub description: &'static str,
pub emoji: char,
pub unlock_condition: BadgeCondition,
}Expand description
One unlockable badge. The emoji is a single Unicode scalar so it can be embedded in share messages and popup frames.
use limitless_cli::modules::achievements::Badge;
let badge = Badge {
id: "port-whisperer",
name: "Port Whisperer",
description: "Kill 5 ghost processes.",
emoji: '\u{1F527}',
unlock_condition: limitless_cli::modules::achievements::BadgeCondition::PortWhisperer,
};
assert_eq!(badge.emoji, '\u{1F527}');Fields§
§id: &'static strStable, kebab-case identifier (used for persistence).
name: &'static strHuman-friendly display name.
description: &'static strShort flavour text shown inside the popup.
emoji: charSingle-char emoji shown alongside the name.
unlock_condition: BadgeConditionWhat unlocks this badge.
Trait Implementations§
impl Eq for Badge
impl StructuralPartialEq for Badge
Auto Trait Implementations§
impl Forget for Badge
impl Freeze for Badge
impl RefUnwindSafe for Badge
impl Send for Badge
impl Sync for Badge
impl Unpin for Badge
impl UnsafeUnpin for Badge
impl UnwindSafe for Badge
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