Struct libdata::column::Value []

pub struct Value(_);

A column value.

The value represents some bit of information. It is an abstract handle, meaning the concrete type is not known from the outside. It is possible to ask it for its type identity, so it's possible to find out if two values are of the same type or ask if it is of a specific type. It is possible to get access to the typed data (if the type is known and matches), but it should be used only when necessary. Prefer the generic handling when possible.

However, it implements a lot of traits that allow for manipulation in generic manner.

This allows tagging flows with data without knowing the types of information used to tag it upfront.

Note that the values act sane in regards to the normal traits. Eg. the Ord implementation can compare even values of different underlying types.

Methods

impl Value
[src]

Provides the identity of the column type.

Tries to turn the value into the type held inside.

This allows accessing the data held inside as the type it actually is. It returns None if the requested type doesn't match the actual one.

Generally, you should use this only if you know the type. Most of the handling can be done in a generic way, without extracting the data inside.

Trait Implementations

impl Clone for Value
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Value
[src]

Formats the value using the given formatter.

impl Eq for Value
[src]

impl<C: Type> From<C> for Value
[src]

Performs the conversion.

impl Ord for Value
[src]

This method returns an Ordering between self and other. Read more

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the maximum of two values. Read more

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the minimum of two values. Read more

impl PartialEq for Value
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl PartialOrd for Value
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Serialize for Value
[src]

Serialize this value into the given Serde serializer. Read more