Struct ::exo::Variable

Overview

Exolynk variable to show & change data with rights and additional settings

Methods

fn new(ident: String, value) -> Variable

Creates a new Color from a String input.

Clone the variable itself.

Protocols

protocol get ident
let output = value.ident

Allows a get operation to work.

protocol set ident
value.ident = input

Allows a set operation to work.

protocol get system
let output = value.system

Allows a get operation to work.

protocol get released
let output = value.released

Allows a get operation to work.

protocol get name
let output = value.name

Allows a get operation to work.

protocol set name
value.name = input

Allows a set operation to work.

protocol get description
let output = value.description

Allows a get operation to work.

protocol set description
value.description = input

Allows a set operation to work.

protocol get required
let output = value.required

Allows a get operation to work.

protocol set required
value.required = input

Allows a set operation to work.

protocol get gdpr
let output = value.gdpr

Allows a get operation to work.

protocol set gdpr
value.gdpr = input

Allows a set operation to work.

protocol get settings
let output = value.settings

Allows a get operation to work.

protocol set settings
value.settings = input

Allows a set operation to work.

protocol partial_eq
if value == b { }

Allows for partial equality operations to work.

protocol string_debug
println("{:?}", value)

Allows the value to be debug printed.

protocol string_display
println("{}", value)

Allows the value to be display printed.

protocol get value
let output = value.value

Allows a get operation to work.

protocol set value
value.value = input

Allows a set operation to work.

protocol get access
let output = value.access

Get the variable access HashMap.

Exaple:

let variable = exo::Variable::new("ident","value");
variable.access = exo::Access::Write;
let access = variable.access;
assert!(access is Object);
assert_eq!(access["00000000-0000-0000-0000-000000000000"], exo::Access::Write);
access["caa17000-4228-4bd3-8bde-cec73cc06623"] = exo::Access::Read;
variable.access = access;
let access = variable.access;
assert_eq!(access["caa17000-4228-4bd3-8bde-cec73cc06623"], exo::Access::Read);
protocol set access
value.access = input

Set the variable access. It can be either set as Map or access which will set the default right uuid.

Exaple:

let variable = exo::Variable::new("ident","value");
variable.access = exo::Access::Write;
let access = variable.access;
assert!(access is Object);
assert_eq!(access["00000000-0000-0000-0000-000000000000"], exo::Access::Write);
access["caa17000-4228-4bd3-8bde-cec73cc06623"] = exo::Access::Read;
variable.access = access;
let access = variable.access;
assert_eq!(access["caa17000-4228-4bd3-8bde-cec73cc06623"], exo::Access::Read);