diff --git a/lib/domain/libimagcontact/src/contact.rs b/lib/domain/libimagcontact/src/contact.rs index 37735f88..14a80e3b 100644 --- a/lib/domain/libimagcontact/src/contact.rs +++ b/lib/domain/libimagcontact/src/contact.rs @@ -17,6 +17,8 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // +use std::ops::Deref; + use vobject::Component; use toml::Value; use toml_query::read::TomlValueReadExt; @@ -69,4 +71,20 @@ impl Contact for Entry { pub struct ContactData(Component); +impl ContactData { + + pub fn into_inner(self) -> Component { + self.0 + } + +} + +impl Deref for ContactData { + type Target = Component; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} +