1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! Device strings as the text and Markdown PICS print them (#2137).
//!
//! Vendor_Name, Model_Name, Firmware_Revision and Application_Software_Version
//! come from the Device object, which an application or a custom Device can
//! fill with any text. Each prints inside one line of the document, so a value
//! must not be able to end that line or, in Markdown, its table cell, or start
//! inline markup: otherwise a value could forge rows or sections. Nor may it
//! hide or reorder its own text with a bidirectional or zero-width character.
//! `VendorInfo` keeps the values as read; only the rendering changes them.
//!
//! The rules are the CLI's and the TUI's, shared through
//! [`bacnet_types::text`] (#2148), without their length cap: line breaks
//! become spaces and the hidden characters are dropped, except the zero width
//! joiner, which only fuses an emoji sequence.
use ;
/// The value's characters as they print on one line: line breaks as spaces,
/// [`is_hidden_on_screen`] characters gone.
+ '_
/// The value as one line of the text PICS, as [`one_line`] gives it: it
/// can't start a line of its own or hide or reorder its text.
pub
/// The value as one Markdown table cell: one line, as [`text_line`] gives it,
/// with a backslash before each character that could end the cell (`|`) or
/// open inline markup: emphasis, code, links, raw HTML, strikethrough or
/// entity references. The backslash itself is escaped too.
pub