Module moveit::new[][src]

Expand description

In-place constructors.

This module provides a range of helpers such as new::by() and new::from() for creating constructors. It is preferred style to use moveit::new; and refer to these helpers with a new:: prefix.

Traits

A copy constructible type: a destination-aware Clone.

A pointer type with a stable address that a New may be used to construct a value with.

A move constructible type: a destination-aware Clone that destroys the moved-from value.

An in-place constructor for a particular type.

An in-place constructor for a particular type, which can potentially fail.

Functions

Returns a New that uses the provided closure for constructing a T.

Returns a New that uses the provided closure for construction.

Returns a new New that uses a copy constructor.

Returns a New calls Default to generate a T.

Returns a New that uses a From implementation to generate a T.

Returns a New that forwards to MoveNew.

Returns a New that simply returns the given value.

Returns a TryNew that uses the provided closure for constructing a T.

Returns a TryNew that uses the provided closure for construction.

Returns a TryNew that uses a TryFrom implementation to generate a T.