Expand description
This crate provides Rob<'a, T>
a type that can contain either a
borrwed reference or an owned Box
. It is similar to std::borrow::Cow<'a, T>
,
but it always uses a Box
to stored owned values.
The main difference with Cow
is that Rob
is not implemented as
an enum, instead it is a struct with a pointer and a flag that
indicates whether the value is owned or not. This allows to use
the value by accessing directly the pointer, without the overhead
of matching an enum needed by Cow
.
Structsยง
- The
Rob
type. See the crate documentation.