Skip to content

LooMaclin/derive_dumb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Derive Dumb generates a structure in which all fields are public. Original structure can be converted using function call dumb.

Example

#[derive(Dumb)]
pub struct A {
    a: String,
}

Generates:

pub struct DumbA {
    pub a: String,
}
impl A {
    fn dumb(self) -> DumbA {
        DumbA {
            a: self.a,
        }
    }
}

Releases

No releases published

Packages

No packages published

Languages