Skip to main content

default_name

Function default_name 

Source
pub fn default_name(
    instance_label: &str,
    host_display: Option<&str>,
    role: &str,
) -> String
Expand description

Default name <computer> · <Host app> · <role>, built to pass check_name (rc4-39):

  • the computer is the instance label as a team sees it (crate::bus::v2::machine_name: yves-mac.local → yves-mac); apostrophes go (Ada’s MacBook → Adas MacBook, as macOS spells its own host name) and every other character outside the rule becomes a space, so no two words are glued together; a label that still fails is left out;
  • an app the engine could not tell (None, see attach::named_host_display) is left out, never “unknown”.