Skip to content

Commit

Permalink
Update library documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
workanator committed Nov 17, 2015
1 parent bb89e41 commit 44d25a3
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,21 @@
//!
//! * `$"SOME_ENV_VAR_NAME"::str` to inject the environment variables `SOME_ENV_VAR_NAME` as the string value.
//! No additiocal changes are made ot the value.
//! * `$"SOME_ENV_VAR_NAME"::bool` to inject the environment variables `SOME_ENV_VAR_NAME` as the boolean value.
//! * `$"SOME_ENV_VAR_NAME"::bool` to inject the environment variable `SOME_ENV_VAR_NAME` as the boolean value.
//! The value `true` or `yes` or `on` or `1` are converted into `true` otherwise into `false`.
//! * `$"SOME_ENV_VAR_NAME"::int` to inject the environment variables `SOME_ENV_VAR_NAME` as the integer value.
//! * `$"SOME_ENV_VAR_NAME"::int` to inject the environment variable `SOME_ENV_VAR_NAME` as the integer value.
//! The successfully parsed value is injected as `i32` or `i64`, depending on the format, otherwise `0i32` is injected.
//! * `$"SOME_ENV_VAR_NAME"::flt` to inject the environment variables `SOME_ENV_VAR_NAME` as the floating value.
//! * `$"SOME_ENV_VAR_NAME"::flt` to inject the environment variable `SOME_ENV_VAR_NAME` as the floating value.
//! The successfully parsed value is injected as `f32` or `f64`, depending on the format, otherwise `0f32` is injected.
//!
//!
//! **Example**:
//! * `$"SOME_ENV_VAR_NAME"::auto` or `$"SOME_ENV_VAR_NAME"` to inject the environment variable `SOME_ENV_VAR_NAME`
//! and resolve the type automatically. Rules of the type auto-resolution:
//! - If the value is *True* or *Yes* or *On* then the result type is `boolean True`;
//! - If the value is *False* or *No* or *Off* then the result type is `boolean False`;
//! - If the value is floating then the result type is `floating`;
//! - If the value is integer then the result type is `integer`;
//! - Otherwise the result is `string` value.
//!
//!**Example**:
//!
//! ```ignore
//! #!/bin/sh
Expand Down

0 comments on commit 44d25a3

Please sign in to comment.