[][src]Derive Macro heim_derive::Getter

#[derive(Getter)]
{
    // Attributes available to this derive:
    #[getter]
}

Generates getters for all struct fields.

This is quite similar to getset or other crates, but highly specific for heim case.

OS-specific structs are usually very thin and contains Copy-able fields, therefore there is no need to return reference to them, it is easier to return a copy (ex. field is u32), that's why generated getters are returning data copies.

Unfortunately, getset crate does not allows this behavior at the moment. If it will, it is better to remove that macro at all.