pub struct DisplayMessage<'a> {
pub title: Cow<'a, str>,
pub text: Cow<'a, str>,
pub severity: Cow<'a, str>,
pub impacts_connectivity: bool,
pub primary_action: Option<DisplayMessageAction<'a>>,
}Expand description
A structured health/display message pushed by the control plane (Go tailcfg.DisplayMessage,
capver 117), surfaced to the user as a warning/notice about node or tailnet state.
#[serde(default)] makes every field optional (Go marshals Title/Text/Severity with no
omitempty, but a tolerant decode shouldn’t fail on a sparse message), and there is
deliberately no deny_unknown_fields: Go adds fields to this struct over time, and an unknown
field must not fail the whole netmap decode.
Fields§
§title: Cow<'a, str>Short, human-readable title summarizing the message.
Cow because admin/control-authored prose can contain a JSON escape (a literal ", \, or
— since Go’s json.Marshal escapes &/</> by default — an &); a borrowed &str
cannot decode an escaped string and would fail the whole MapResponse decode.
text: Cow<'a, str>Longer, human-readable body text describing the message. Cow for the same escape-tolerance
reason as title (and body prose is the most likely to contain a newline).
severity: Cow<'a, str>Severity of the message. Go’s DisplayMessageSeverity is a string with known values
"high", "medium", and "low"; this is kept as an open Cow<'a, str> (rather than a
closed enum) so an unrecognized future severity decodes rather than failing the netmap.
impacts_connectivity: boolWhether the condition this message describes impacts the node’s connectivity.
primary_action: Option<DisplayMessageAction<'a>>Optional primary call-to-action (e.g. a “learn more”/“fix it” link) for this message.
Trait Implementations§
Source§impl<'a> Clone for DisplayMessage<'a>
impl<'a> Clone for DisplayMessage<'a>
Source§fn clone(&self) -> DisplayMessage<'a>
fn clone(&self) -> DisplayMessage<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more