pub struct ContactMethod {
pub meta: Bo4eMeta,
pub contact_type: Option<ContactType>,
pub contact_value: Option<String>,
pub description: Option<String>,
pub is_preferred: Option<bool>,
}Expand description
Method of contact (email, phone, etc.).
Used to represent contact information for a person within business objects.
German: Kontaktweg
§Example
use bo4e_core::com::ContactMethod;
use bo4e_core::enums::ContactType;
let contact = ContactMethod {
contact_type: Some(ContactType::Email),
contact_value: Some("info@example.com".to_string()),
is_preferred: Some(true),
..Default::default()
};Fields§
§meta: Bo4eMetaBO4E metadata
contact_type: Option<ContactType>Type of contact (Kontaktart)
contact_value: Option<String>Contact value - phone number, email address, etc. (Kontaktwert)
description: Option<String>Description/specification, e.g., “direct line”, “switchboard” (Beschreibung)
is_preferred: Option<bool>Whether this is the preferred contact method (IstBevorzugterKontaktweg)
Trait Implementations§
Source§impl Bo4eObject for ContactMethod
impl Bo4eObject for ContactMethod
Source§fn type_name_german() -> &'static str
fn type_name_german() -> &'static str
Returns the German type name as used in the
_typ field. Read moreSource§fn type_name_english() -> &'static str
fn type_name_english() -> &'static str
Returns the English type name. Read more
Source§impl Clone for ContactMethod
impl Clone for ContactMethod
Source§fn clone(&self) -> ContactMethod
fn clone(&self) -> ContactMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContactMethod
impl Debug for ContactMethod
Source§impl Default for ContactMethod
impl Default for ContactMethod
Source§fn default() -> ContactMethod
fn default() -> ContactMethod
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContactMethod
impl<'de> Deserialize<'de> for ContactMethod
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ContactMethod
impl PartialEq for ContactMethod
Source§impl Serialize for ContactMethod
impl Serialize for ContactMethod
impl StructuralPartialEq for ContactMethod
Auto Trait Implementations§
impl Freeze for ContactMethod
impl RefUnwindSafe for ContactMethod
impl Send for ContactMethod
impl Sync for ContactMethod
impl Unpin for ContactMethod
impl UnsafeUnpin for ContactMethod
impl UnwindSafe for ContactMethod
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