#[repr(transparent)]pub struct Value { /* private fields */ }
Expand description
A generic value capable of carrying various types.
Once created the type of the value can’t be changed.
Some types (e.g. String
and objects) support None
values while others
(e.g. numeric types) don’t.
Value
does not implement the Send
trait, but SendValue
can be
used instead.
See the module documentation for more details.
Implementations
Creates a new Value
that is initialized for a given ValueType
.
Tries to get a value of type T
.
Returns Ok
if the type is correct.
Tries to get a value of an owned type T
.
Returns true
if the type of the value corresponds to T
or is a sub-type of T
.
Returns whether Value
s of type src
can be transformed to type dst
.
Tries to transform the value into a value of the target type
Trait Implementations
type Checker = NopChecker
type Checker = NopChecker
Value type checker.
Get the contained value from a Value
. Read more
type Checker = NopChecker
type Checker = NopChecker
Value type checker.
Get the contained value from a Value
. Read more
Auto Trait Implementations
impl RefUnwindSafe for Value
impl UnwindSafe for Value
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a SendValue
clone of self
.