(&self)
| 421 | } |
| 422 | |
| 423 | pub fn profile_label(&self) -> String { |
| 424 | self.profile.as_ref().map_or_else( |
| 425 | || format!("{} (unprofiled)", self.provider.r#type), |
| 426 | |profile| { |
| 427 | if profile.display_name.is_empty() { |
| 428 | profile.id.clone() |
| 429 | } else { |
| 430 | profile.display_name.clone() |
| 431 | } |
| 432 | }, |
| 433 | ) |
| 434 | } |
| 435 | |
| 436 | pub fn category_label(&self) -> &'static str { |
| 437 | self.profile.as_ref().map_or("legacy", |profile| { |