#[non_exhaustive]pub struct VCard { /* private fields */ }Expand description
A parsed vCard contact recovered from a BEGIN:VCARD … END:VCARD payload.
Each field holds the first value seen for its property (FN/N, TEL,
EMAIL, ORG, URL, ADR). The struct is #[non_exhaustive]: read via
the accessors; additional fields may appear in 1.x.
Implementations§
Source§impl VCard
impl VCard
Sourcepub fn parse(s: &str) -> Result<Self, ParseError>
pub fn parse(s: &str) -> Result<Self, ParseError>
Parses a vCard payload.
Tolerant of versions 2.1 / 3.0 / 4.0, either line ending, line folding,
and property parameters. The name comes from FN, or from N when no
FN is present.
§Errors
Returns ParseError::InvalidFormat if no BEGIN:VCARD line is found.
Sourcepub fn organization(&self) -> Option<&str>
pub fn organization(&self) -> Option<&str>
The organization (ORG).
Trait Implementations§
impl Eq for VCard
impl StructuralPartialEq for VCard
Auto Trait Implementations§
impl Freeze for VCard
impl RefUnwindSafe for VCard
impl Send for VCard
impl Sync for VCard
impl Unpin for VCard
impl UnsafeUnpin for VCard
impl UnwindSafe for VCard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more