Expand description
Contains abstractions over references and ownership. Provides types which may represent either a borrowed reference or an owned value.
Both sized and unsized types may be used. References may be either mutable or immutable. The right enum should be chosen on these bases.
Enumsยง
- RefMut
OrBox - A type which can be either a mutable reference, or an owned boxed value.
Box is used for the owned variant because this type is primarily intended for
use with unsized types, most particularly trait objects. For sized types,
it is strongly suggested to use
RefMutOrOwnedinstead. - RefMut
OrOwned - A type which can be either a mutable reference, or an owned value.
RefMutOrOwned requires sized types. For unsized types, use
RefMutOrBoxinstead. - RefOr
Box - A type which can be either an immutable reference, or an owned boxed value.
Box is used for the owned variant because this type is primarily intended for
use with unsized types, most particularly trait objects. For sized types,
it is strongly suggested to use
RefOrOwnedinstead. - RefOr
Owned - A type which can be either an immutable reference, or an owned value.
RefOrOwned requires sized types. For unsized types, use
RefOrBoxinstead.