imag/libimagbookmark/src/link.rs

22 lines
292 B
Rust
Raw Normal View History

2016-07-08 14:20:35 +00:00
use std::ops::{Deref, DerefMut};
2016-07-07 22:27:35 +00:00
#[derive(Debug, Clone)]
pub struct Link(String);
impl Deref for Link {
type Target = String;
2016-07-08 14:20:35 +00:00
fn deref(&self) -> &String {
2016-07-07 22:27:35 +00:00
&self.0
}
}
impl DerefMut for Link {
2016-07-08 14:20:35 +00:00
fn deref_mut(&mut self) -> &mut String {
2016-07-07 22:27:35 +00:00
&mut self.0
}
}