Crate extra_default

Source
Expand description

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.

Traitsยง

  • Allows creating a default box of a type.
  • Allows creating a default owned version of a type.
  • Allows creating a default reference to a type.