#extra #default #slice #rustdoc #formal #go #find #traits #add #self


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

Used in 3 crates (via multistr)

Custom license

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.


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

extra-default = "0.1"

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


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


  • alloc
  • collections
  • std