from-string 1.0.0

A crate that provides a FromString trait with a String to String noop.
Documentation
  • Coverage
  • 100%
    5 out of 5 items documented2 out of 4 items with examples
  • Size
  • Source code size: 15.5 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.38 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • mitsuhiko/from-string
    14 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mitsuhiko

from-string

A crate that provides a FromString trait that works similar to FromStr but operates on owned strings. It's implemented for all types that implement FromStr with compatible errors and it has a fast-path for the no-op string to string conversion.

For convenience reasons it is constrained to conversions that return a Box<dyn Error + Send + Sync>.

use from_string::from_string;

let s: String = from_string("Hello World!").unwrap();
let i: u64 = from_string("42").unwrap();

License and Links