credence_lib/configuration/
annotations.rs

1use {
2    compris::{resolve::*, *},
3    kutil::{cli::depict::*, std::immutable::*},
4};
5
6//
7// AnnotationsConfiguration
8//
9
10/// Annotations configuration.
11#[derive(Clone, Debug, Depict, Resolve)]
12pub struct AnnotationsConfiguration {
13    /// Start delimiter.
14    #[resolve(key = "start-delimiter")]
15    #[depict(style(string))]
16    pub start_delimiter: ByteString,
17
18    /// End delimiter.
19    #[resolve(key = "end-delimiter")]
20    #[depict(style(string))]
21    pub end_delimiter: ByteString,
22
23    /// Default format.
24    #[resolve(key = "default-format")]
25    #[depict(as(display), style(symbol))]
26    pub default_format: ResolveFromStr<Format>,
27}
28
29impl Default for AnnotationsConfiguration {
30    fn default() -> Self {
31        Self { start_delimiter: "```".into(), end_delimiter: "```".into(), default_format: Default::default() }
32    }
33}