#[derive(Debug, Snafu)]
#[snafu(module)]
enum Error { Alpha }
By default, should that generate
mod error {
//! This crate provides types for UCD’s `Blocks.txt`. | |
pub struct Blocks { | |
ranges: Vec<(RangeInclusive<u32>, String)>, | |
} | |
impl Blocks { | |
pub fn block_of(&self, c: char) -> &str { | |
self.ranges | |
.binary_search_by(|(range, _)| { |
#[derive(Debug, Snafu)]
#[snafu(module)]
enum Error { Alpha }
By default, should that generate
mod error {
// This code was saved by an automated test for the Rust Playground |
// This code was saved by an automated test for the Rust Playground |
// This code was saved by an automated test for the Rust Playground |
// This code was saved by an automated test for the Rust Playground |
// This code was saved by an automated test for the Rust Playground |
// This code was saved by an automated test for the Rust Playground |
// This code was saved by an automated test for the Rust Playground |
{ | |
"text": "`Twas brillig, and the slithy toves | |
Did gyre and gimble in the wabe: | |
All mimsy were the borogoves, | |
And the mome raths outgrabe. | |
\"Beware the Jabberwock, my son! | |
The jaws that bite, the claws that catch! | |
Beware the Jubjub bird, and shun | |
The frumious Bandersnatch!\" |