Skip to main content

libutils_console/
mod.rs

1//^
2//^ HEAD
3//^
4
5//> HEAD -> NO_STD
6#![no_std]
7
8//> HEAD -> CRATES
9extern crate alloc;
10
11//> HEAD -> MODULES
12mod argument;
13mod continuations;
14
15//> HEAD -> THREAT
16use libutils_threat::Threat;
17
18//> HEAD -> ARGUMENT
19pub use argument::Argument;
20
21//> HEAD -> ISSUE
22use libutils_issue::Issue;
23
24//> HEAD -> CORE
25use core::fmt::{
26    Display,
27    Debug
28};
29
30//> HEAD -> CONTINUATIONS
31pub use continuations::{
32    Synchronization,
33    Descriptor,
34    Data
35};
36
37
38//^
39//^ CONSOLE
40//^
41
42//> CONSOLE -> TRAIT
43pub trait Console {
44    fn arguments<'valid>(&'valid self) -> &'valid [Argument];
45    fn open(&self, filename: &str) -> Result<impl Descriptor, Issue>;
46    fn problem(&self, threat: Threat) -> impl Synchronization;
47    fn print(&self, value: impl Display) -> impl Synchronization;
48    fn debug(&self, value: impl Debug) -> impl Synchronization;
49}