Skip to main content

vcard/value/
org.rs

1//! # ORG value
2//!
3//! The decoded `ORG` (organization) value.
4//!
5//! `ORG` is a structured RFC 6350 6.6.4 value: a `;`-ordered sequence of
6//! organization units, from the top-level organization name down through
7//! divisions, which this bespoke type holds as an ordered list.
8
9use alloc::{borrow::Cow, vec::Vec};
10
11/// The decoded ORG value: organization units, broadest first.
12#[derive(Clone, Debug, Default, PartialEq, Eq)]
13pub struct VcardOrg<'a>(pub Vec<Cow<'a, str>>);
14
15impl<'a> From<Vec<Cow<'a, str>>> for VcardOrg<'a> {
16    fn from(units: Vec<Cow<'a, str>>) -> Self {
17        Self(units)
18    }
19}