1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
//
// Copyright (c) DUSK NETWORK. All rights reserved.
//! Dusk denomination.
const DUSK_UNIT: f64 = 1_000_000_000.0;
/// The minimum increment of Dusk.
pub const LUX: Dusk = dusk;
/// The Dusk denomination. Use the [`dusk`] function to convert from floating
/// point format, and the [`from_dusk`] function to convert back to Dusk.
///
/// Values of Dusk should *never* be assigned directly. Instead they should use
/// a call to the [`dusk`] function. If increments of the smallest denomination
/// are desired, the [`LUX`] constant can be used.
pub type Dusk = u64;
/// Converts from floating point format to Dusk.
pub const
/// Converts from Dusk to floating point format.
pub const