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 -> ARGUMENT
16pub use argument::Argument;
17
18//> HEAD -> ISSUE
19use libutils_issue::Issue;
20
21//> HEAD -> CORE
22use core::fmt::{
23    Display,
24    Debug
25};
26
27//> HEAD -> CONTINUATIONS
28pub use continuations::{
29    Synchronization,
30    Descriptor,
31    Data
32};
33
34
35//^
36//^ CONSOLE
37//^
38
39//> CONSOLE -> TRAIT
40pub trait Console {
41    fn arguments<'valid>(&'valid self) -> &'valid [Argument];
42    fn open(&self, filename: &str) -> Result<impl Descriptor, Issue>;
43    fn problem(&self, issue: Issue, chain: &[&'static str]) -> impl Synchronization;
44    fn print(&self, value: impl Display) -> impl Synchronization;
45    fn debug(&self, value: impl Debug) -> impl Synchronization;
46}