#default #traits #go #along

no-std extra-default

Extra traits to go along with the Default trait

2 unstable releases

Uses old Rust 2015

0.2.0 Apr 15, 2017
0.1.0 Feb 21, 2017

#11 in #along


Used in 3 crates (via multistr)

Custom license

6KB
121 lines

Extra Default traits

Extra traits to go along with the Default trait. You may freely use and modify this code under the CC0 1.0 Universal License.

Usage

To use in your own project, just add the below to your Cargo.toml file.

[dependencies]
extra-default = "0.1"

For more formal documentation, you can find the rustdoc here.


lib.rs:

This crate provides additional Default traits which are most useful for slices and strings.

  • DefaultRef is imiplemented for for<'a> &'a Self: Default.
  • DefaultBox is imiplemented for Box<Self>: Default.
  • DefaultOwned is imiplemented for <Self as ToOwned>::Owned: Default.

No runtime deps

Features