Crates.io | simplers |
lib.rs | simplers |
version | 1.0.10 |
source | src |
created_at | 2024-05-31 08:11:08.914913 |
updated_at | 2024-06-03 09:34:22.839514 |
description | Simplification of too complex stuff in rust |
homepage | |
repository | https://github.com/coderspark/simplers |
max_upload_size | |
id | 1257774 |
size | 5,756 |
Simple.rs is a crate i made to make things in rust that i found too complicated a little easier.
Still new to rust but this was fun to make.
Definition:
pub fn input<'a>(s: impl Into<Option<&'a str>>) -> String{
}
It lets you easily do input with 1 function instead of printing, flushing, reading the line, and then trimming the newline after the input
Colours
any others:
Color {
r: <red>,
g: <green>,
b: <blue>
}
Definition:
fn color(text: &'static str, clr: Color) -> String {
}
Color text
Definition:
macro_rules! weigh {
($s:expr, $($args:expr),*) => {{
}}
}
Add weight to text such as bold, or italic just add more Weights for multiple at once
Those are all the weights :)
Definition:
fn color(iptext: &'static str, clr: Color) -> String {
}
input but coloured