Add Link type

This commit is contained in:
Matthias Beyer 2016-07-08 00:27:35 +02:00
parent eb47f08479
commit ee51de088a
2 changed files with 22 additions and 0 deletions

View file

@ -11,4 +11,5 @@ module_entry_path_mod!("bookmark", "0.1.0");
pub mod collection; pub mod collection;
pub mod error; pub mod error;
pub mod link;
pub mod result; pub mod result;

View file

@ -0,0 +1,21 @@
use std::ops::{Deref, DerefMut}
#[derive(Debug, Clone)]
pub struct Link(String);
impl Deref for Link {
type Target = String;
fn deref(&self) => &String {
&self.0
}
}
impl DerefMut for Link {
fn deref_mut(&mut self) => &mut String {
&mut self.0
}
}