forward-methods 0.0.2

A derive macro for forwarding methods from composed objects
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub struct Message(pub String);

pub struct Printer;

impl Message {
    pub fn get_message(&self) -> String {
        self.0.to_string()
    }
    pub fn get_len(&self) -> usize {
        self.0.len()
    }
}

impl Printer {
    pub fn println(&self, msg: impl Into<String>) {
        println!("{}", msg.into())
    }
}