Crate owner_monad[][src]

Rust implementation of a monad which provides ownership of an object.

Structs

BindOwner

An implementation of the OwnerOnce, Owner and OwnerMut traits which contains a mapping from one owner to another; see bind().

PureOwner

An implementation of the OwnerOnce, Owner and OwnerMut traits which simply contains a single (pure) value; see pure().

Traits

Owner

A monad which conditionally provides immutable access to a T value.

OwnerMut

A monad which conditionally provides mutable access to a T value.

OwnerOnce

A monad which conditionally provides access to a T value.

Functions

bind

Creates an instance of ownership monads which maps from the given owner to another using the given function.

pure

Creates an instance of ownership monads which provides access to the given value.