mirror of
https://github.com/Steffo99/micronfig.git
synced 2024-12-22 20:14:18 +00:00
Update documentation with the latest changes
This commit is contained in:
parent
72e92ab2f9
commit
a101102214
4 changed files with 31 additions and 7 deletions
Binary file not shown.
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 7.7 KiB |
BIN
.media/icon-512x512.png
Normal file
BIN
.media/icon-512x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 159 KiB |
26
.media/icon.svg
Normal file
26
.media/icon.svg
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<svg height="100%" id="emblematic-background" version="1.1" viewBox="0 0 512 512" width="100%" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<defs>
|
||||||
|
<linearGradient gradientUnits="userSpaceOnUse" id="background" x2="512" y1="512">
|
||||||
|
<stop offset="0" stop-color="#051436"/>
|
||||||
|
<stop offset=".75" stop-color="#001553"/>
|
||||||
|
<stop offset="1" stop-color="#010a4e"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<rect fill="url(#background)" height="512" width="512"/>
|
||||||
|
</svg>
|
||||||
|
<svg height="63%" id="emblematic-icon" preserveAspectRatio="xMidYMid meet" viewBox="0 0 512 512" width="63%" x="94.72" xmlns="http://www.w3.org/2000/svg" y="94.72">
|
||||||
|
<defs>
|
||||||
|
<filter color-interpolation-filters="sRGB" id="emblematic-filter">
|
||||||
|
<feFlood flood-color="rgb(1,8,40)" in="SourceGraphic" result="flood"/>
|
||||||
|
<feGaussianBlur in="SourceGraphic" result="blur" stdDeviation="10"/>
|
||||||
|
<feOffset dx="-4" dy="8" in="blur" result="offset"/>
|
||||||
|
<feComposite in="flood" in2="offset" operator="in" result="comp1"/>
|
||||||
|
<feComposite in="SourceGraphic" in2="comp1" result="comp2"/>
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
<!--! Font Awesome Pro 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2024 Fonticons, Inc. -->
|
||||||
|
<path d="M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z" fill="#85c4ff" filter="url(#emblematic-filter)"/>
|
||||||
|
</svg>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.4 KiB |
|
@ -94,11 +94,13 @@
|
||||||
//! The syntax for conversion is as follows:
|
//! The syntax for conversion is as follows:
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
|
//! use std::net::SocketAddr;
|
||||||
|
//!
|
||||||
//! micronfig::config! {
|
//! micronfig::config! {
|
||||||
//! // use FromStr to parse the String as an isize
|
//! // use FromStr to parse the String as an isize
|
||||||
//! REQUIRED_SIGNED: String > isize,
|
//! REQUIRED_SIGNED: String > isize,
|
||||||
//! // use FromStr to parse the String as a SocketAddr
|
//! // use FromStr to parse the String as a SocketAddr
|
||||||
//! REQUIRED_SOCKETADDR: String > std::net::SocketAddr,
|
//! REQUIRED_SOCKETADDR: String > SocketAddr,
|
||||||
//! // use From to convert the String to... another String
|
//! // use From to convert the String to... another String
|
||||||
//! REQUIRED_STRING: String -> String,
|
//! REQUIRED_STRING: String -> String,
|
||||||
//! // use TryFrom to convert the String to another String
|
//! // use TryFrom to convert the String to another String
|
||||||
|
@ -109,10 +111,6 @@
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! > ***Warning***
|
|
||||||
//! >
|
|
||||||
//! > Types should always be fully qualified, or the macro won't work properly!
|
|
||||||
//!
|
|
||||||
//! Custom types can be used as well:
|
//! Custom types can be used as well:
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
|
@ -131,7 +129,7 @@
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
//! micronfig::config! {
|
//! micronfig::config! {
|
||||||
//! MY_CUSTOM_TYPE: String -> crate::Duplicator,
|
//! MY_CUSTOM_TYPE: String -> Duplicator,
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
//! # fn main() {}
|
//! # fn main() {}
|
||||||
|
@ -150,7 +148,7 @@
|
||||||
//!
|
//!
|
||||||
//! micronfig::config! {
|
//! micronfig::config! {
|
||||||
//! // First parse the string as an u64 with FromStr, then convert it to a ChatId with From.
|
//! // First parse the string as an u64 with FromStr, then convert it to a ChatId with From.
|
||||||
//! RESPOND_TO_MESSAGES_IN: String > u64 -> crate::ChatId,
|
//! RESPOND_TO_MESSAGES_IN: String > u64 -> ChatId,
|
||||||
//! }
|
//! }
|
||||||
//!
|
//!
|
||||||
//! # fn main() {}
|
//! # fn main() {}
|
||||||
|
|
Loading…
Reference in a new issue