::std::default::

Function default

pub fn default<T: Default>() -> T
Expand

Builds a default value for a type implementing the Default trait.

Examples

let zero: uint<8> = default();
let none: Option<bool> = default();
assert zero == 0;
assert none == None;