Skip to main content

VcardParam

Enum VcardParam 

Source
pub enum VcardParam<'a> {
Show 25 variants AltId(Cow<'a, str>), Author(Cow<'a, str>), AuthorName(Cow<'a, str>), CalScale(Cow<'a, str>), Charset(Cow<'a, str>), Created(Cow<'a, str>), Derived(Cow<'a, str>), Encoding(Cow<'a, str>), Geo(Cow<'a, str>), Jsptr(Cow<'a, str>), Label(Cow<'a, str>), Language(Cow<'a, str>), MediaType(Cow<'a, str>), Phonetic(Cow<'a, str>), Pid(Vec<Cow<'a, str>>), Pref(Cow<'a, str>), PropId(Cow<'a, str>), Script(Cow<'a, str>), ServiceType(Cow<'a, str>), SortAs(Vec<Cow<'a, str>>), Type(Vec<Cow<'a, str>>), Tz(Cow<'a, str>), Username(Cow<'a, str>), Value(Cow<'a, str>), Unknown { name: Cow<'a, str>, values: Vec<Cow<'a, str>>, },
}
Expand description

A decoded parameter: one known kind, or Unknown for anything unmodelled.

Variants§

§

AltId(Cow<'a, str>)

ALTID: ties alternative representations of the same logical property.

§

Author(Cow<'a, str>)

AUTHOR: the URI of the author of the value.

§

AuthorName(Cow<'a, str>)

AUTHOR-NAME: the name of the author of the value.

§

CalScale(Cow<'a, str>)

CALSCALE: the calendar scale of a date/time value.

§

Charset(Cow<'a, str>)

CHARSET: the character set of the value (vCard 2.1).

§

Created(Cow<'a, str>)

CREATED: the timestamp of the property’s creation.

§

Derived(Cow<'a, str>)

DERIVED: whether the value derives from other properties.

§

Encoding(Cow<'a, str>)

ENCODING: the inline encoding of the value (vCard 2.1 / 3.0).

§

Geo(Cow<'a, str>)

GEO: a global positioning value for the property.

§

Jsptr(Cow<'a, str>)

JSPTR: the JSON pointer locating a preserved JSContact property.

§

Label(Cow<'a, str>)

LABEL: the formatted text of a delivery address.

§

Language(Cow<'a, str>)

LANGUAGE: the language of the property value (RFC 5646 tag).

§

MediaType(Cow<'a, str>)

MEDIATYPE: the media type of the referenced resource.

§

Phonetic(Cow<'a, str>)

PHONETIC: the phonetic system the value is written in.

§

Pid(Vec<Cow<'a, str>>)

PID: the source identifiers of this property instance.

§

Pref(Cow<'a, str>)

PREF: the preference of this instance among a set (1-100).

§

PropId(Cow<'a, str>)

PROP-ID: the identity of this property instance across conversions.

§

Script(Cow<'a, str>)

SCRIPT: the script the value is written in.

§

ServiceType(Cow<'a, str>)

SERVICE-TYPE: the online service the property points at.

§

SortAs(Vec<Cow<'a, str>>)

SORT-AS: the components to sort the property by.

§

Type(Vec<Cow<'a, str>>)

TYPE: the kinds or contexts of the property (e.g. work, home).

§

Tz(Cow<'a, str>)

TZ: the time zone of the property.

§

Username(Cow<'a, str>)

USERNAME: the username on the online service.

§

Value(Cow<'a, str>)

VALUE: the value type the property value is to be read as.

§

Unknown

Any parameter the model does not decode: its name and its values.

Fields

§name: Cow<'a, str>

The verbatim parameter name, as it was spelled on the wire.

§values: Vec<Cow<'a, str>>

The ,-separated raw values, empty when the parameter carries none.

Implementations§

Source§

impl VcardParam<'_>

Source

pub fn kind(&self) -> Option<VcardParamKind>

The closed VcardParamKind of this parameter, or None for Unknown (which is outside the vocabulary).

Source§

impl VcardParam<'_>

Source

pub fn encode(&self) -> VcardParamNode<'static>

Available on crate feature parser only.

Encode the parameter into a raw parameter node, dispatching on its kind.

Trait Implementations§

Source§

impl<'a> Clone for VcardParam<'a>

Source§

fn clone(&self) -> VcardParam<'a>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for VcardParam<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Eq for VcardParam<'a>

Source§

impl<'a> PartialEq for VcardParam<'a>

Source§

fn eq(&self, other: &VcardParam<'a>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a> StructuralPartialEq for VcardParam<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for VcardParam<'a>

§

impl<'a> RefUnwindSafe for VcardParam<'a>

§

impl<'a> Send for VcardParam<'a>

§

impl<'a> Sync for VcardParam<'a>

§

impl<'a> Unpin for VcardParam<'a>

§

impl<'a> UnsafeUnpin for VcardParam<'a>

§

impl<'a> UnwindSafe for VcardParam<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.