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};
35
36
37//^
38//^ CONSOLE
39//^
40
41//> CONSOLE -> TRAIT
42pub trait Console {
43    fn arguments<'valid>(&'valid self) -> &'valid [Argument];
44    fn open(&self, filename: &str) -> Result<impl Descriptor, Issue>;
45    fn problem(&self, threat: Threat) -> impl Synchronization;
46    fn print(&self, value: impl Display) -> impl Synchronization;
47    fn debug(&self, value: impl Debug) -> impl Synchronization;
48}