Table of Contents






Value

A value is an enum with a unit variant for each different value it can store. This strictly typed Value is used within the record and variable to store values.

Variants
data type description
Value::Language(Language) Stores a Language value
Value::String(String) Stores a String value
Value::Float(f64) Stores a f64 floating value
Value::Integer(i64) Stores a i64 number value
Value::Bool(Bool) Stores a boolean value
Value::Ident(Ident) Stores a Ident value
Value::Selection(Selection) Stores a Selection value
Value::Version(Version) Stores a version value
Value::List(List) Stores a list value
Value::Reference(Reference) Stores a reference value
Value::Color(Color) Stores a color value
Value::Table(Table) Stores a complete table
Example
// Create a Value with String typ
let val_s = Value::String("Hello World");

// Check for the string
match val_s {
  Value::String(s) => println!("String: {}", s),
  _ => println!("No String value")
}
Description

Returns an Option which includes a String, when the Value was of type String.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<String> A option which contains the string when the Value contianed a string
Description

Returns an Option which includes a List, when the Value was of type List.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<List> A option which contains the List when the Value contianed a List
Description

Returns an Option which includes a Reference, when the Value was of type Reference.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<Reference> A option which contains the Reference when the Value contianed a Reference
Description

Returns an Option which includes a Language, when the Value was of type Language.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<Language> A option which contains the Language when the Value contianed a Language
Description

Returns an Option which includes a f64, when the Value was of type Float.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<f64> A option which contains the f64 when the Value contianed a Float
Description

Returns an Option which includes a i64, when the Value was of type Integer.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<i64> A option which contains the i64 when the Value contianed a Integer
Description

Returns an Option which includes a bool, when the Value was of type Bool.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<bool> A option which contains the bool when the Value contianed a Bool
Description

Returns an Option which includes a Ident, when the Value was of type Ident.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<Ident> A option which contains the Ident when the Value contianed a Ident
Description

Returns an Option which includes a Selection, when the Value was of type Selection.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<Selection> A option which contains the Selection when the Value contianed a Selection
Description

Returns an Option which includes a Version, when the Value was of type Version.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<Version> A option which contains the Version when the Value contianed a Version
Description

Returns an Option which includes a Color, when the Value was of type Color.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<Color> A option which contains the Color when the Value contianed a Color
Description

Returns an Option which includes a Table, when the Value was of type Table.

Parameters
parameter data type description
0 Self / Value A reference to the own object
Returns
data type description
Option<Table> A option which contains the Table when the Value contianed a Table