Skip to main content

mkutils/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2#![cfg_attr(
3    feature = "unstable",
4    feature(sliceindex_wrappers, try_trait_v2, try_trait_v2_residual)
5)]
6#![cfg_attr(
7    all(feature = "async", feature = "unstable", feature = "serde"),
8    feature(associated_type_defaults)
9)] // NOTE-socket-c8f04c
10
11// NOTE-ee355f: this allows [::mkutils] to be used from inside this crate
12extern crate self as mkutils;
13
14mod active_vec;
15mod fmt;
16mod indexed;
17mod interval_set;
18mod is;
19mod macros;
20mod read_value;
21mod saturating_add_signed;
22mod seq_visitor;
23mod timestamped;
24mod utils;
25
26#[cfg(all(feature = "serde", feature = "tracing"))]
27mod as_valuable;
28
29#[cfg(feature = "async")]
30mod event;
31
32#[cfg(feature = "tui")]
33mod geometry;
34
35#[cfg(feature = "async")]
36mod into_stream;
37
38#[cfg(feature = "tui")]
39mod key_map;
40
41#[cfg(feature = "unstable")]
42mod output;
43
44#[cfg(feature = "async")]
45mod process;
46
47#[cfg(feature = "tui")]
48mod rgb;
49
50#[cfg(feature = "tui")]
51mod rope;
52
53#[cfg(feature = "async")]
54mod run_for;
55
56#[cfg(feature = "tui")]
57mod screen;
58
59#[cfg(feature = "tui")]
60mod scroll_bar;
61
62#[cfg(feature = "tui")]
63mod scroll_view;
64
65#[cfg(feature = "tui")]
66mod scroll_view_state;
67
68// NOTE-socket-c8f04c
69#[cfg(all(feature = "async", feature = "unstable", feature = "serde"))]
70mod socket;
71
72#[cfg(feature = "tui")]
73mod terminal;
74
75#[cfg(feature = "tracing")]
76mod timer;
77
78#[cfg(feature = "tracing")]
79mod tracing;
80
81#[cfg(feature = "tui")]
82mod transpose;
83
84#[cfg(feature = "unstable")]
85pub use crate::output::Output;
86#[cfg(all(feature = "async", feature = "unstable", feature = "serde"))] // NOTE-socket-c8f04c
87pub use crate::socket::{Request, Socket};
88pub use crate::{
89    active_vec::ActiveVec,
90    fmt::{Debugged, OptionDisplay, ResultDisplay, StatusDisplay},
91    indexed::Indexed,
92    interval_set::{Interval, IntervalSet},
93    read_value::ReadValue,
94    saturating_add_signed::SaturatingAddSigned,
95    timestamped::Timestamped,
96    utils::Utils,
97};
98#[cfg(feature = "async")]
99pub use crate::{
100    event::Event,
101    process::{Process, ProcessBuilder},
102};
103#[cfg(feature = "tui")]
104pub use crate::{
105    geometry::{Orientation, Point, PointIsize, PointU16, PointUsize},
106    key_map::{
107        key_binding::KeyBinding,
108        key_map::{KeyBindingTrie, KeyMap},
109        key_map_session::KeyMapSession,
110        key_map_state::{KeyMapIncSearch, KeyMapState},
111    },
112    rgb::Rgb,
113    rope::{
114        atoms::{Atom, Atoms},
115        builder::RopeBuilder,
116        chunk::Chunk,
117        chunk_extended_grapheme_iter::ChunkExtendedGraphemeIter,
118        line::Line,
119        lines::Lines,
120        rope::Rope,
121        text_summary::{DirectedTextSummary, TextSummary},
122    },
123    screen::{Screen, ScreenConfig, ScreenTerminal, Stdout},
124    scroll_view::ScrollView,
125    scroll_view_state::{ScrollCountType, ScrollViewState, ScrollWhen},
126    terminal::Terminal,
127    transpose::Transpose,
128};
129#[cfg(feature = "tracing")]
130pub use crate::{timer::Timer, tracing::Tracing};
131pub use mkutils_macros::{
132    ConstAssoc, Constructor, Default, FromChain, SaturatingAdd, SaturatingSub, SetVariant, Toggle, TypeAssoc, context,
133    tokio_main,
134};