fn traits_to_derive(t: &TraitsToDerive) -> (bool, bool) {
    let mut gen_serialize = true;
    let mut gen_deserialize = true;

    // setup the flags
    match t {
        TraitsToDerive::All => { /* do nothing */ }
        TraitsToDerive::DeserializeOnly => {
            gen_serialize = false;
        }
        TraitsToDerive::SerializeOnly => {
            gen_deserialize = false;
        }
        TraitsToDerive::FieldOnly => {
            gen_deserialize = false;
            gen_serialize = false;
        }
    }

    (gen_serialize, gen_deserialize)
}
// Helper method for identifying the traits to derive
Helper method for identifying the traits to derive
Helper method for identifying the traits to derive
fn traits_to_derive(t: &TraitsToDerive) -> (bool, bool) {
    let mut gen_serialize = true;
    let mut gen_deserialize = true;
    // setup the flags
    match t {
        TraitsToDerive::All => { /* do nothing */ }
        TraitsToDerive::DeserializeOnly => {
            gen_serialize = false;
        }
        TraitsToDerive::SerializeOnly => {
            gen_deserialize = false;
        }
        TraitsToDerive::FieldOnly => {
            gen_deserialize = false;
            gen_serialize = false;
        }
    }
    (gen_serialize, gen_deserialize)
}
fn traits_to_derive ( t : & TraitsToDerive ) -> ( bool , bool ) { let mut gen_serialize = true ; let mut gen_deserialize = true ; // setup the flags match t { TraitsToDerive :: All => { /* do nothing */ } TraitsToDerive :: DeserializeOnly => { gen_serialize = false ; } TraitsToDerive :: SerializeOnly => { gen_deserialize = false ; } TraitsToDerive :: FieldOnly => { gen_deserialize = false ; gen_serialize = false ; } } ( gen_serialize , gen_deserialize ) }
Helper method for identifying the traits to derive
Helper method for identifying the traits to derive
t
&TraitsToDerive
t
&TraitsToDerive