primitives/prelude/
mod.rs

1//! The `primitives` prelude.
2//!
3//! The purpose of this module is to alleviate imports of many common primitives
4//! traits by adding a glob import to the top of primitives heavy modules:
5//!
6//! ```
7//! # #![allow(unused_imports)]
8//! use primitives::prelude::*;
9//! ```
10
11mod enums;
12pub use self::enums::*;
13
14mod traits;
15pub use self::traits::*;
16
17mod canvas;
18pub use canvas::*;
19
20pub mod color;
21
22/// This is the basic glue for the  UX Framework
23///
24pub trait Object: 'static {}
25
26/// Marks structures as framework [Object]'s
27///
28pub trait Is<T: Object>: AsRef<T> + 'static {}
29
30pub use crate::foundation::colorspace::{
31    Color,
32    prelude::*
33};
34
35/// Creates a structure with zero values.
36///
37/// This interface is obsolete.
38///
39pub trait Zero {
40    /// Creates a structure with zero values.
41    fn zero() -> Self;
42}
43
44/// Creates a structure with values equal to one.
45///
46/// This interface is obsolete.
47///
48pub trait One {
49    /// Creates a structure with values equal to one.
50    fn one() -> Self;
51}