Struct ::exo::Reference

Overview

Reference type, which is an uuid, referencing another record

Methods

fn new() -> Reference

Creates a new empty Reference with a nil Uuid.

Example

let rf = exo::Reference::new();
assert_eq!("00000000-0000-0000-0000-000000000000", rf.to_string());
fn nil() -> Reference

Creates a new empty Reference with a nil Uuid.

Example

let rf = exo::Reference::nil();
assert_eq!("00000000-0000-0000-0000-000000000000", rf.to_string());
fn random() -> Reference

Creates a new Reference with a random Uuid.

fn try_from(value) -> Result

Tries to create a new Reference from a generic value.

Return the reference as string

Protocols

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.