-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
59 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//! TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//! Using with external types and parsers. | ||
//! | ||
//! TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//! Frequently asked questions (ie. Why can't I do this?) | ||
//! | ||
//! ## Why isn't parsing numbers from string representation supported? | ||
//! | ||
//! Numbers have many different types of representations in string formats and | ||
//! can be parsed in many different ways. While Rust's standard library supports | ||
//! parsing numbers from strings, it doesn't support parsing them directly from | ||
//! bytes. Dangerous seeks to provide a foundation for other parsing libraries | ||
//! leaving the representation and the method of parsing as a downstream | ||
//! concern. | ||
//! | ||
//! Dangerous does implement support via [`error::External`] for the errors | ||
//! returned by the standard library's `from_str_radix` functions. See | ||
//! [`guide::external`] for more information. | ||
//! | ||
//! [`guide::external`]: crate::guide::external | ||
//! [`error::External`]: crate::error::External |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//! Usage guide. | ||
//! | ||
//! # Basic usage | ||
//! | ||
//! ``` | ||
//! use dangerous::{Input, Invalid}; | ||
//! | ||
//! let input = dangerous::input(b"hello"); | ||
//! let result: Result<_, Invalid> = input.read_partial(|r| { | ||
//! r.read() | ||
//! }); | ||
//! | ||
//! assert_eq!(result, Ok((b'h', dangerous::input(b"ello")))); | ||
//! ``` | ||
//! # Feature flags | ||
//! | ||
//! - `std` (**default feature**): Enables `std::error::Error` support and `alloc`. | ||
//! - `alloc` (**default feature**): Enables allocations. | ||
//! - `simd` (**default feature**): Enables all supported SIMD optimisations. | ||
//! - `unicode` (**default feature**): Enables improved unicode printing support. | ||
//! - `full-backtrace` (**default feature**): Enables collection of all contexts for `Expected`. | ||
//! | ||
//! **Third-party crate support (opt-in)** | ||
//! | ||
//! - `zc`: Enables `zc` crate support. | ||
//! - `nom`: Enables `nom` crate error support. | ||
//! - `regex`: Enables `regex` pattern support. | ||
|
||
pub mod bounded; | ||
pub mod external; | ||
pub mod faq; | ||
pub mod streaming; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//! TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters