Struct ::exo::Model

Overview

Model to define a specific record structure

Methods

Create a new record based upon this model.

Example

let model = exo::get_model()?;
let record = model.new_record();
assert!(record is exo::Record);
fn get_variable(self, ident: String) -> Option

Try to get a variable by it's ident from the model.

Example

let model = exo::get_model()?;
let variable = model.get_variable("name")?;
assert!(variable is exo::Variable);
fn create_record(self, value: String, value2, value3, value4) -> Result
Deprecated:This function is deprecated, please use exo::Model::new_record

Create a new record based upon this model.

Example

let model = exo::get_model()?;
let record = model.create_record("new_user", "1", "New User", "New User Description")?;
assert!(record is exo::Record);

Protocols

protocol get ident
let output = value.ident

Allows a get operation to work.

protocol get version
let output = value.version

Allows a get operation to work.

protocol get status
let output = value.status

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 icon
let output = value.icon

Allows a get operation to work.

protocol set icon
value.icon = input

Allows a set operation to work.

protocol get layout
let output = value.layout

Allows a get operation to work.

protocol set layout
value.layout = input

Allows a set operation to work.

protocol get variables
let output = value.variables

Allows a get operation to work.

protocol set variables
value.variables = input

Allows a set operation to work.

protocol get record_right
let output = value.record_right

Allows a get operation to work.

protocol set record_right
value.record_right = input

Allows a set operation to work.

protocol get system
let output = value.system

Allows a get operation to work.

protocol get uuid
let output = value.uuid

Allows a get 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.