vcard-rs 0.4.0

vCard parser, validator, editor, merger and builder library
Documentation
//! # CALURI
//!
//! The `CALURI` property: the URI of the contact's calendar, decoded as a
//! URI.
//!
//! See RFC 6350 6.9.3.

use crate::{
    param::VcardParamKind,
    prop::{VcardPropKind, spec::VcardPropSpec},
    value::VcardValueKind,
    version::VcardVersion,
};

/// The `CALURI` property marker.
pub struct CALURI;

impl VcardPropSpec for CALURI {
    const KIND: VcardPropKind = VcardPropKind::CalUri;

    fn allowed_versions() -> &'static [VcardVersion] {
        &[VcardVersion::V4_0]
    }

    fn allowed_values(_version: VcardVersion) -> &'static [VcardValueKind] {
        &[VcardValueKind::Uri]
    }

    fn allowed_params(_version: VcardVersion) -> &'static [VcardParamKind] {
        &[
            VcardParamKind::Pid,
            VcardParamKind::Pref,
            VcardParamKind::Type,
            VcardParamKind::MediaType,
            VcardParamKind::AltId,
            VcardParamKind::Value,
        ]
    }
}